1 #include "../Eigen/Sparse" 2 using namespace Eigen; 3 4 typedef SparseMatrix<double,ColMajor> Mat1; 5 #ifdef EIGEN_SHOULD_FAIL_TO_BUILD 6 typedef SparseMatrix<double,RowMajor> Mat2; 7 #else 8 typedef SparseMatrix<double,ColMajor> Mat2; 9 #endif 10 main()11int main() 12 { 13 Mat1 a(10,10); 14 Mat2 b(10,10); 15 a += b; 16 } 17