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