• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/vector.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/vector.hpp>
14 namespace hana = boost::hana;
15 namespace mpl = boost::mpl;
16 
17 
18 BOOST_HANA_CONSTANT_CHECK(
19     hana::find_if(mpl::vector<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::vector<int, float, char const*>{}, hana::type_c<void>)
26     ==
27     hana::nothing
28 );
29 
main()30 int main() { }
31