]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/mpl/test/filter_view.cpp
2 // Copyright Aleksey Gurtovoy 2001-2004
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)
8 // See http://www.boost.org/libs/mpl for documentation.
14 #include <boost/static_assert.hpp>
15 #include <boost/mpl/filter_view.hpp>
16 #include <boost/mpl/transform_view.hpp>
17 #include <boost/mpl/max_element.hpp>
18 #include <boost/mpl/list.hpp>
19 #include <boost/mpl/sizeof.hpp>
20 #include <boost/mpl/deref.hpp>
21 #include <boost/mpl/equal.hpp>
22 #include <boost/mpl/aux_/test.hpp>
24 #include <boost/type_traits/is_float.hpp>
25 #include <boost/type_traits/is_same.hpp>
29 typedef mpl::list
<int,float,long,float,char[50],long double,char> types
;
30 typedef mpl::list
<float,float,long double> floats
;
32 MPL_ASSERT(( equal
< mpl::filter_view
< types
,boost::is_float
<_
> >::type
,floats
> ));
34 typedef mpl::max_element
<
36 mpl::filter_view
< types
,boost::is_float
<_
> >
41 MPL_ASSERT((is_same
<mpl::deref
<iter::base
>::type
, long double>));