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

16
failtest/ref_5.cpp Normal file
View File

@@ -0,0 +1,16 @@
#include "../Eigen/Core"
using namespace Eigen;
void call_ref(Ref<VectorXf> a) { }
int main()
{
VectorXf a(10);
DenseBase<VectorXf> &ac(a);
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
call_ref(ac);
#else
call_ref(ac.derived());
#endif
}