diff options
author | Gael Guennebaud <g.gael@free.fr> | 2014-09-23 10:26:02 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2014-09-23 10:26:02 +0200 |
commit | 72569f17ecbc37309291aa7f333c8236aba8ee3f (patch) | |
tree | 6f3d827e1979af574d0b80387e4d2febfffcdea6 /failtest/cwiseunaryview_on_const_type_actually_const.cpp | |
parent | 3878e6f1703c22782ef9897fe46c7f1fc6a47ae5 (diff) |
bug #882: add const-correctness failtests for CwiseUnaryView, TriangularView, and SelfAdjointView.
Diffstat (limited to 'failtest/cwiseunaryview_on_const_type_actually_const.cpp')
-rw-r--r-- | failtest/cwiseunaryview_on_const_type_actually_const.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/failtest/cwiseunaryview_on_const_type_actually_const.cpp b/failtest/cwiseunaryview_on_const_type_actually_const.cpp new file mode 100644 index 000000000..fcd41dfdb --- /dev/null +++ b/failtest/cwiseunaryview_on_const_type_actually_const.cpp @@ -0,0 +1,16 @@ +#include "../Eigen/Core" + +#ifdef EIGEN_SHOULD_FAIL_TO_BUILD +#define CV_QUALIFIER const +#else +#define CV_QUALIFIER +#endif + +using namespace Eigen; + +void foo(){ + MatrixXf m; + CwiseUnaryView<internal::scalar_real_ref_op<double>,CV_QUALIFIER MatrixXf>(m).coeffRef(0, 0) = 1.0f; +} + +int main() {} |