aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/indexed_view.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2017-01-24 16:28:12 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2017-01-24 16:28:12 +0100
commitd83db761a2b9cedcb25519b3e556b5e495adc115 (patch)
tree11962e478d7a4d9d0897209aea890db2db86f69d /test/indexed_view.cpp
parentbc1020185407a324be81f613d88ce4b162f6774d (diff)
Add support for std::integral_constant
Diffstat (limited to 'test/indexed_view.cpp')
-rw-r--r--test/indexed_view.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/indexed_view.cpp b/test/indexed_view.cpp
index e70a9c616..8fa1c16f4 100644
--- a/test/indexed_view.cpp
+++ b/test/indexed_view.cpp
@@ -204,6 +204,15 @@ void check_indexed_view()
VERIFY( is_same_seq_type( seq(2,fix<5>), seqN(2,4) ) );
#if EIGEN_HAS_CXX11
VERIFY( is_same_seq_type( seq(fix<2>,fix<5>), seqN(fix<2>,fix<4>) ) );
+ VERIFY( is_same_seq( seqN(2,std::integral_constant<int,5>(),std::integral_constant<int,-2>()), seqN(2,fix<5>,fix<-2>()) ) );
+ VERIFY( is_same_seq( seq(std::integral_constant<int,1>(),std::integral_constant<int,5>(),std::integral_constant<int,2>()),
+ seq(fix<1>,fix<5>,fix<2>()) ) );
+ VERIFY( is_same_seq_type( seqN(2,std::integral_constant<int,5>(),std::integral_constant<int,-2>()), seqN(2,fix<5>,fix<-2>()) ) );
+ VERIFY( is_same_seq_type( seq(std::integral_constant<int,1>(),std::integral_constant<int,5>(),std::integral_constant<int,2>()),
+ seq(fix<1>,fix<5>,fix<2>()) ) );
+
+ VERIFY( is_same_seq_type( seqN(2,std::integral_constant<int,5>()), seqN(2,fix<5>) ) );
+ VERIFY( is_same_seq_type( seq(std::integral_constant<int,1>(),std::integral_constant<int,5>()), seq(fix<1>,fix<5>) ) );
#else
// sorry, no compile-time size recovery in c++98/03
VERIFY( is_same_seq( seq(fix<2>,fix<5>), seqN(fix<2>,fix<4>) ) );