2 // Copyright Aleksey Gurtovoy 2004
3 // Copyright Eric Friedman 2003
5 // Distributed under the Boost Software License, Version 1.0.
6 // (See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
9 // See http://www.boost.org/libs/mpl for documentation.
15 #include <boost/mpl/stable_partition.hpp>
17 #include <boost/mpl/vector_c.hpp>
18 #include <boost/mpl/equal.hpp>
19 #include <boost/mpl/comparison.hpp>
20 #include <boost/mpl/int.hpp>
21 #include <boost/mpl/aux_/test.hpp>
23 typedef vector_c<int,3,4,0,-5,8,-1,7>::type numbers;
24 typedef vector_c<int,0,-5,-1>::type manual_first;
25 typedef vector_c<int,3,4,8,7>::type manual_second;
29 typedef stable_partition<
34 MPL_ASSERT(( equal< result::first,manual_first > ));
35 MPL_ASSERT(( equal< result::second,manual_second > ));
40 typedef stable_partition<
42 , greater_equal< _, int_<3> >
45 MPL_ASSERT(( equal< result::first,manual_second > ));
46 MPL_ASSERT(( equal< result::second,manual_first > ));