• 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/bool.hpp>
6 #include <boost/hana/core/to.hpp>
7 #include <boost/hana/integral_constant.hpp>
8 namespace hana = boost::hana;
9 
10 
11 static_assert(hana::is_convertible<hana::bool_<true>, bool>::value, "");
12 static_assert(hana::to<bool>(hana::bool_c<true>) == true, "");
13 
14 static_assert(hana::is_convertible<hana::integral_constant<int, 1>, int>::value, "");
15 static_assert(hana::to<int>(hana::integral_c<int, 1>) == 1, "");
16 
17 static_assert(hana::is_convertible<hana::integral_constant<long, 1l>, long>::value, "");
18 static_assert(hana::to<long>(hana::integral_c<long, 1l>) == 1l, "");
19 
main()20 int main() { }
21