From c6fefe5d8e3eda8af05c7dcb278551598dbb5d8e Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 5 Nov 2014 16:15:17 +0100 Subject: Big 853: replace enable_if in Ref<> ctor by static assertions and add failtests for Ref<> --- failtest/ref_5.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 failtest/ref_5.cpp (limited to 'failtest/ref_5.cpp') diff --git a/failtest/ref_5.cpp b/failtest/ref_5.cpp new file mode 100644 index 000000000..846d52795 --- /dev/null +++ b/failtest/ref_5.cpp @@ -0,0 +1,16 @@ +#include "../Eigen/Core" + +using namespace Eigen; + +void call_ref(Ref a) { } + +int main() +{ + VectorXf a(10); + DenseBase &ac(a); +#ifdef EIGEN_SHOULD_FAIL_TO_BUILD + call_ref(ac); +#else + call_ref(ac.derived()); +#endif +} -- cgit v1.2.3