aboutsummaryrefslogtreecommitdiffhomepage
path: root/failtest/selfadjointview_nonconst_ctor_on_const_xpr.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2014-09-23 10:26:02 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2014-09-23 10:26:02 +0200
commit72569f17ecbc37309291aa7f333c8236aba8ee3f (patch)
tree6f3d827e1979af574d0b80387e4d2febfffcdea6 /failtest/selfadjointview_nonconst_ctor_on_const_xpr.cpp
parent3878e6f1703c22782ef9897fe46c7f1fc6a47ae5 (diff)
bug #882: add const-correctness failtests for CwiseUnaryView, TriangularView, and SelfAdjointView.
Diffstat (limited to 'failtest/selfadjointview_nonconst_ctor_on_const_xpr.cpp')
-rw-r--r--failtest/selfadjointview_nonconst_ctor_on_const_xpr.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/failtest/selfadjointview_nonconst_ctor_on_const_xpr.cpp b/failtest/selfadjointview_nonconst_ctor_on_const_xpr.cpp
new file mode 100644
index 000000000..a240f8184
--- /dev/null
+++ b/failtest/selfadjointview_nonconst_ctor_on_const_xpr.cpp
@@ -0,0 +1,15 @@
+#include "../Eigen/Core"
+
+#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
+#define CV_QUALIFIER const
+#else
+#define CV_QUALIFIER
+#endif
+
+using namespace Eigen;
+
+void foo(CV_QUALIFIER Matrix3d &m){
+ SelfAdjointView<Matrix3d,Upper> t(m);
+}
+
+int main() {}