]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/example/ext/boost/mpl/list/iterable.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / hana / example / ext / boost / mpl / list / iterable.cpp
1 // Copyright Louis Dionne 2013-2016
2 // Distributed under the Boost Software License, Version 1.0.
3 // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
4
5 #include <boost/hana/assert.hpp>
6 #include <boost/hana/drop_front.hpp>
7 #include <boost/hana/drop_while.hpp>
8 #include <boost/hana/equal.hpp>
9 #include <boost/hana/ext/boost/mpl/list.hpp>
10 #include <boost/hana/ext/std/integral_constant.hpp>
11 #include <boost/hana/front.hpp>
12 #include <boost/hana/type.hpp>
13
14 #include <boost/mpl/list.hpp>
15 #include <type_traits>
16 namespace hana = boost::hana;
17 namespace mpl = boost::mpl;
18
19
20 BOOST_HANA_CONSTANT_CHECK(hana::front(mpl::list<int, char, void>{}) == hana::type_c<int>);
21
22 BOOST_HANA_CONSTANT_CHECK(hana::equal(
23 hana::drop_front(mpl::list<int, char, void>{}),
24 mpl::list<char, void>{}
25 ));
26
27 BOOST_HANA_CONSTANT_CHECK(hana::equal(
28 hana::drop_while(mpl::list<float, double const, int, float&>{},
29 hana::trait<std::is_floating_point>),
30 mpl::list<int, float&>{}
31 ));
32
33 int main() { }