From 72569f17ecbc37309291aa7f333c8236aba8ee3f Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 23 Sep 2014 10:26:02 +0200 Subject: bug #882: add const-correctness failtests for CwiseUnaryView, TriangularView, and SelfAdjointView. --- .../selfadjointview_on_const_type_actually_const.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 failtest/selfadjointview_on_const_type_actually_const.cpp (limited to 'failtest/selfadjointview_on_const_type_actually_const.cpp') diff --git a/failtest/selfadjointview_on_const_type_actually_const.cpp b/failtest/selfadjointview_on_const_type_actually_const.cpp new file mode 100644 index 000000000..19aaad6d0 --- /dev/null +++ b/failtest/selfadjointview_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; + SelfAdjointView(m).coeffRef(0, 0) = 1.0f; +} + +int main() {} -- cgit v1.2.3