• 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/contains.hpp>
7 #include <boost/hana/integral_constant.hpp>
8 #include <boost/hana/map.hpp>
9 #include <boost/hana/pair.hpp>
10 #include <boost/hana/set.hpp>
11 namespace hana = boost::hana;
12 
13 
main()14 int main() {
15     {
16         auto set = hana::make_set(hana::int_c<1>, hana::integral_c<signed char, 'x'>);
17 
18         BOOST_HANA_CONSTANT_CHECK(hana::contains(set, hana::int_c<1>));
19         BOOST_HANA_CONSTANT_CHECK(hana::contains(set, hana::integral_c<signed char, 'x'>));
20     }
21 
22     {
23         auto map = hana::make_map(
24             hana::make_pair(hana::int_c<1>, 1),
25             hana::make_pair(hana::integral_c<signed char, 'x'>, 'x')
26         );
27 
28         BOOST_HANA_CONSTANT_CHECK(hana::contains(map, hana::int_c<1>));
29         BOOST_HANA_CONSTANT_CHECK(hana::contains(map, hana::integral_c<signed char, 'x'>));
30     }
31 }
32