1 | |
---|
2 | // Copyright Aleksey Gurtovoy 2001-2004 |
---|
3 | // |
---|
4 | // Distributed under the Boost Software License,Version 1.0. |
---|
5 | // (See accompanying file LICENSE_1_0.txt or copy at |
---|
6 | // http://www.boost.org/LICENSE_1_0.txt) |
---|
7 | // |
---|
8 | // See http://www.boost.org/libs/mpl for documentation. |
---|
9 | |
---|
10 | // $Source: /cvsroot/boost/boost/libs/mpl/test/insert.cpp,v $ |
---|
11 | // $Date: 2004/09/02 15:41:35 $ |
---|
12 | // $Revision: 1.4 $ |
---|
13 | |
---|
14 | #include <boost/mpl/insert.hpp> |
---|
15 | |
---|
16 | #include <boost/mpl/find.hpp> |
---|
17 | #include <boost/mpl/vector_c.hpp> |
---|
18 | #include <boost/mpl/size.hpp> |
---|
19 | #include <boost/mpl/range_c.hpp> |
---|
20 | #include <boost/mpl/equal.hpp> |
---|
21 | #include <boost/mpl/aux_/test.hpp> |
---|
22 | |
---|
23 | MPL_TEST_CASE() |
---|
24 | { |
---|
25 | typedef vector_c<int,0,1,3,4,5,6,7,8,9> numbers; |
---|
26 | typedef find< numbers,integral_c<int,3> >::type pos; |
---|
27 | typedef insert< numbers,pos,integral_c<int,2> >::type range; |
---|
28 | |
---|
29 | MPL_ASSERT_RELATION( size<range>::value, ==, 10 ); |
---|
30 | MPL_ASSERT(( equal< range,range_c<int,0,10> > )); |
---|
31 | } |
---|