From a7ae628c9f8a83973e899866ecd344bbfde6e844 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Mon, 8 Jun 2015 10:14:08 +0200 Subject: bug #1005: fix regression regarding sparse coeff-wise binary operator that did not trigger a static assertion for mismatched storage --- failtest/sparse_storage_mismatch.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 failtest/sparse_storage_mismatch.cpp (limited to 'failtest/sparse_storage_mismatch.cpp') diff --git a/failtest/sparse_storage_mismatch.cpp b/failtest/sparse_storage_mismatch.cpp new file mode 100644 index 000000000..51840d416 --- /dev/null +++ b/failtest/sparse_storage_mismatch.cpp @@ -0,0 +1,16 @@ +#include "../Eigen/Sparse" +using namespace Eigen; + +typedef SparseMatrix Mat1; +#ifdef EIGEN_SHOULD_FAIL_TO_BUILD +typedef SparseMatrix Mat2; +#else +typedef SparseMatrix Mat2; +#endif + +int main() +{ + Mat1 a(10,10); + Mat2 b(10,10); + a += b; +} -- cgit v1.2.3