blob: 937a32481322f7a03eb40ab54650cccb19aee9cb [file] [edit]
// SPDX-FileCopyrightText: The Eigen Authors
// SPDX-License-Identifier: MPL-2.0
#define EIGEN_NO_STATIC_ASSERT
#include "../Eigen/Core"
int main() {
Eigen::Transpositions<2> transpositions;
transpositions.setIdentity();
Eigen::Matrix2d matrix = Eigen::Matrix2d::Identity();
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
auto operand = matrix.triangularView<Eigen::Lower>();
#else
auto operand = matrix;
#endif
Eigen::Matrix2d result = Eigen::Matrix2d::Constant(42);
result.noalias() = Eigen::Product<decltype(transpositions), decltype(operand)>(transpositions, operand);
return result.isIdentity() ? 0 : 1;
}