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

18
failtest/ref_1.cpp Normal file
View File

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