mpl::always is now nullary. Test is updated to take care of new possible calls using apply and apply0.

[SVN r71163]
This commit is contained in:
Joel Falcou
2014-03-02 23:40:10 +00:00
committed by Daniel James
parent 74fef329d4
commit 94154603ec
2 changed files with 11 additions and 6 deletions
+8 -2
View File
@@ -22,6 +22,8 @@ MPL_TEST_CASE()
{
typedef always<true_> always_true;
MPL_ASSERT(( apply< always_true > ));
MPL_ASSERT(( apply0< always_true > ));
MPL_ASSERT(( apply1< always_true,false_ > ));
MPL_ASSERT(( apply2< always_true,false_,false_ > ));
MPL_ASSERT(( apply3< always_true,false_,false_,false_ > ));
@@ -31,11 +33,15 @@ MPL_TEST_CASE()
MPL_TEST_CASE()
{
typedef always< int_<10> > always_10;
typedef apply< always_10 >::type res;
typedef apply0< always_10 >::type res0;
typedef apply1< always_10,int_<0> >::type res1;
typedef apply2< always_10,int_<0>,int_<0> >::type res2;
typedef apply3< always_10,int_<0>,int_<0>,int_<0> >::type res3;
MPL_ASSERT_RELATION( res::value, ==, 10 );
MPL_ASSERT_RELATION( res0::value, ==, 10 );
MPL_ASSERT_RELATION( res1::value, ==, 10 );
MPL_ASSERT_RELATION( res2::value, ==, 10 );
MPL_ASSERT_RELATION( res3::value, ==, 10 );