]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/example/tutorial/ext/mpl_vector.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)
5 #include <boost/hana/equal.hpp>
6 #include <boost/hana/front.hpp>
7 #include <boost/hana/integral_constant.hpp>
8 #include <boost/hana/type.hpp>
10 #include <boost/mpl/size.hpp>
11 #include <boost/mpl/vector.hpp>
12 namespace hana
= boost::hana
;
13 namespace mpl
= boost::mpl
;
17 #include <boost/hana/ext/boost/mpl/vector.hpp> // bridge header
19 using Vector
= mpl::vector
<int, char, float>;
20 static_assert(hana::front(Vector
{}) == hana::type_c
<int>, "");
26 using Size
= mpl::size
<Vector
>::type
;
27 static_assert(hana::equal(Size
{}, hana::int_c
<3>), ""); // breaks!
33 #include <boost/hana/ext/boost/mpl/integral_c.hpp>
35 using Size
= mpl::size
<Vector
>::type
;
36 static_assert(hana::equal(Size
{}, hana::int_c
<3>), "");