forked from boostorg/mpl
MPL: merge test for #2042/#3298 from the trunk (thanks to Steven Watanabe for the fix!)
[SVN r55752]
This commit is contained in:
23
test/map.cpp
23
test/map.cpp
@@ -194,3 +194,26 @@ MPL_TEST_CASE()
|
|||||||
test<mymap>();
|
test<mymap>();
|
||||||
test<mymap::type>();
|
test<mymap::type>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MPL_TEST_CASE()
|
||||||
|
{
|
||||||
|
typedef mpl::erase_key<
|
||||||
|
mpl::map<
|
||||||
|
mpl::pair<char, double>
|
||||||
|
, mpl::pair<int, float>
|
||||||
|
>
|
||||||
|
, char
|
||||||
|
>::type int_to_float_map;
|
||||||
|
|
||||||
|
typedef mpl::insert<
|
||||||
|
int_to_float_map
|
||||||
|
, mpl::pair<char, long>
|
||||||
|
>::type with_char_too;
|
||||||
|
|
||||||
|
BOOST_MPL_ASSERT((
|
||||||
|
boost::is_same<
|
||||||
|
mpl::at<with_char_too, char>::type
|
||||||
|
, long
|
||||||
|
>
|
||||||
|
));
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user