aboutsummaryrefslogtreecommitdiffhomepage
path: root/failtest/ref_3.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'failtest/ref_3.cpp')
-rw-r--r--failtest/ref_3.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/failtest/ref_3.cpp b/failtest/ref_3.cpp
new file mode 100644
index 000000000..f46027d48
--- /dev/null
+++ b/failtest/ref_3.cpp
@@ -0,0 +1,15 @@
+#include "../Eigen/Core"
+
+using namespace Eigen;
+
+#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
+void call_ref(Ref<VectorXf> a) { }
+#else
+void call_ref(const Ref<const VectorXf> &a) { }
+#endif
+
+int main()
+{
+ VectorXf a(10);
+ call_ref(a+a);
+}