blob: b1f4aae4d8ecab13ee7a1f640f7bf30896a7664b [file]
// SPDX-FileCopyrightText: The Eigen Authors
// SPDX-License-Identifier: MPL-2.0
#define EIGEN_NO_STATIC_ASSERT
#include "../Eigen/Core"
#include "../Eigen/SparseCore"
// A skew-symmetric matrix has a dense assignment kernel only: a sparse destination used to compile and recurse
// without end in EigenBase::evalTo().
int main() {
Eigen::SkewSymmetricMatrix3<double> skew(Eigen::Vector3d(1, 2, 3));
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
Eigen::SparseMatrix<double> result(3, 3);
#else
Eigen::Matrix3d result;
#endif
result = skew;
return result.coeff(1, 0) == 3 ? 0 : 1;
}