Big 853: replace enable_if in Ref<> ctor by static assertions and add failtests for Ref<>

This commit is contained in:
Gael Guennebaud
2014-11-05 16:15:17 +01:00
parent 739ed32222
commit 4577bafb91
9 changed files with 101 additions and 11 deletions

15
failtest/ref_2.cpp Normal file
View File

@@ -0,0 +1,15 @@
#include "../Eigen/Core"
using namespace Eigen;
void call_ref(Ref<VectorXf> a) { }
int main()
{
MatrixXf A(10,10);
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
call_ref(A.row(3));
#else
call_ref(A.col(3));
#endif
}