// Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include MPL_TEST_CASE() { typedef vector_c numbers; typedef find< numbers,integral_c >::type pos; typedef insert_range< numbers,pos,range_c >::type range; MPL_ASSERT_RELATION( size::value, ==, 10 ); MPL_ASSERT(( equal< range,range_c > )); typedef insert_range< list0<>,end< list0<> >::type,list1 >::type result2; MPL_ASSERT_RELATION( size::value, ==, 1 ); } template void test_associative() { typedef typename insert_range< A,typename end< A >::type,B >::type C; MPL_ASSERT_RELATION( size::value, <=, (size::value + size::value) ); MPL_ASSERT(( fold< joint_view< A,B >,true_,and_< _1,contains< C,_2 > > > )); } MPL_TEST_CASE() { typedef set3< short,int,long > signed_integers; typedef set3< unsigned short,unsigned int,unsigned long > unsigned_integers; test_associative(); typedef set_c< int,1,3,5,7,9 > odds; typedef set_c< int,0,2,4,6,8 > evens; test_associative(); typedef map2< pair< void,void* > , pair< int,int* > > pointers; typedef map2< pair< void const,void const* > , pair< int const,int const* > > pointers_to_const; test_associative(); }