aboutsummaryrefslogtreecommitdiffhomepage
path: root/failtest/selfadjointview_on_const_type_actually_const.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'failtest/selfadjointview_on_const_type_actually_const.cpp')
-rw-r--r--failtest/selfadjointview_on_const_type_actually_const.cpp16
1 files changed, 16 insertions, 0 deletions
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<CV_QUALIFIER MatrixXf,Upper>(m).coeffRef(0, 0) = 1.0f;
+}
+
+int main() {}