From 07c2081aacaa575dd3e0b31f9f20026e1492778a Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Mon, 18 Mar 2019 11:38:36 +0100 Subject: [PATCH] fix unit test in c++03: c++03 does not allow passing local or anonymous enum as template param (grafted from 48898a988a5159d2f3c0ff00bd737d17b202e844 ) --- test/constructor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/constructor.cpp b/test/constructor.cpp index 12d4ed341..988539951 100644 --- a/test/constructor.cpp +++ b/test/constructor.cpp @@ -20,6 +20,8 @@ template struct Wrapper inline operator MatrixType& () { return m_mat; } }; +enum my_sizes { M = 12, N = 7}; + template void ctor_init1(const MatrixType& m) { // Check logic in PlainObjectBase::_init1 @@ -82,7 +84,6 @@ void test_constructor() VERIFY_IS_EQUAL(a(4), 123.f); } { - enum { M = 12, N = 7}; MatrixXi m1(M,N); VERIFY_IS_EQUAL(m1.rows(),M); VERIFY_IS_EQUAL(m1.cols(),N);