]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/example/ext/boost/mpl/list/searchable.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / hana / example / ext / boost / mpl / list / searchable.cpp
1 // Copyright Louis Dionne 2013-2017
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/equal.hpp>
7 #include <boost/hana/ext/boost/mpl/list.hpp>
8 #include <boost/hana/find.hpp>
9 #include <boost/hana/find_if.hpp>
10 #include <boost/hana/optional.hpp>
11 #include <boost/hana/type.hpp>
12
13 #include <boost/mpl/list.hpp>
14 namespace hana = boost::hana;
15 namespace mpl = boost::mpl;
16
17
18 BOOST_HANA_CONSTANT_CHECK(
19 hana::find_if(mpl::list<int, float, char const*>{}, hana::equal.to(hana::type_c<float>))
20 ==
21 hana::just(hana::type_c<float>)
22 );
23
24 BOOST_HANA_CONSTANT_CHECK(
25 hana::find(mpl::list<int, float, char const*>{}, hana::type_c<void>)
26 ==
27 hana::nothing
28 );
29
30 int main() { }