diff --git a/test/map.cpp b/test/map.cpp index 2f1a59a..3d74c19 100644 --- a/test/map.cpp +++ b/test/map.cpp @@ -12,7 +12,7 @@ // $Date$ // $Revision$ -#include +#include #include #include #include @@ -24,6 +24,7 @@ #include #include #include +#include #include @@ -158,3 +159,38 @@ MPL_TEST_CASE() MPL_ASSERT_RELATION( size::type::value, ==, 0 ); MPL_ASSERT(( is_same< at::type,void_ > )); } + +// Use a template for testing so that GCC will show us the actual types involved +template +void test() +{ + MPL_ASSERT_RELATION( size::value, ==, 3 ); + + typedef typename end::type not_found; + BOOST_MPL_ASSERT_NOT(( is_same >::type,not_found> )); + BOOST_MPL_ASSERT_NOT(( is_same >::type,not_found> )); + BOOST_MPL_ASSERT_NOT(( is_same >::type,not_found> )); + BOOST_MPL_ASSERT(( is_same::type,not_found> )); +}; + +MPL_TEST_CASE() +{ + typedef map< mpl::pair > map_of_1_pair; + typedef begin::type iter_to_1_pair; + + BOOST_MPL_ASSERT(( + is_same< + deref::type + , mpl::pair + > + )); + + typedef map< + mpl::pair + , mpl::pair + , mpl::pair + > mymap; + + test(); + test(); +}