mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-11 23:51:49 +08:00
fix unit test in c++03: c++03 does not allow passing local or anonymous enum as template param
(grafted from 48898a988a5159d2f3c0ff00bd737d17b202e844 )
This commit is contained in:
parent
dd93c41618
commit
07c2081aac
@ -20,6 +20,8 @@ template<typename MatrixType> struct Wrapper
|
|||||||
inline operator MatrixType& () { return m_mat; }
|
inline operator MatrixType& () { return m_mat; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum my_sizes { M = 12, N = 7};
|
||||||
|
|
||||||
template<typename MatrixType> void ctor_init1(const MatrixType& m)
|
template<typename MatrixType> void ctor_init1(const MatrixType& m)
|
||||||
{
|
{
|
||||||
// Check logic in PlainObjectBase::_init1
|
// Check logic in PlainObjectBase::_init1
|
||||||
@ -82,7 +84,6 @@ void test_constructor()
|
|||||||
VERIFY_IS_EQUAL(a(4), 123.f);
|
VERIFY_IS_EQUAL(a(4), 123.f);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
enum { M = 12, N = 7};
|
|
||||||
MatrixXi m1(M,N);
|
MatrixXi m1(M,N);
|
||||||
VERIFY_IS_EQUAL(m1.rows(),M);
|
VERIFY_IS_EQUAL(m1.rows(),M);
|
||||||
VERIFY_IS_EQUAL(m1.cols(),N);
|
VERIFY_IS_EQUAL(m1.cols(),N);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user