sparse_ref_3.cpp 271 B

123456789101112131415
  1. #include "../Eigen/Sparse"
  2. using namespace Eigen;
  3. #ifdef EIGEN_SHOULD_FAIL_TO_BUILD
  4. void call_ref(Ref<SparseMatrix<float> > a) { }
  5. #else
  6. void call_ref(const Ref<const SparseMatrix<float> > &a) { }
  7. #endif
  8. int main()
  9. {
  10. SparseMatrix<float> a(10,10);
  11. call_ref(a+a);
  12. }