• 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/experimental/printable.hpp>
7 #include <boost/hana/integral_constant.hpp>
8 #include <boost/hana/pair.hpp>
9 
10 #include <sstream>
11 namespace hana = boost::hana;
12 
13 
main()14 int main() {
15     {
16         std::ostringstream ss;
17         ss << hana::experimental::print(
18             hana::make_pair(1, hana::int_c<1>)
19         );
20         BOOST_HANA_RUNTIME_CHECK(ss.str() == "(1, 1)");
21     }
22 
23     {
24         std::ostringstream ss;
25         ss << hana::experimental::print(
26             hana::make_pair(1, hana::int_c<2>)
27         );
28         BOOST_HANA_RUNTIME_CHECK(ss.str() == "(1, 2)");
29     }
30 
31     {
32         std::ostringstream ss;
33         ss << hana::experimental::print(
34             hana::make_pair('x', hana::int_c<2>)
35         );
36         BOOST_HANA_RUNTIME_CHECK(ss.str() == "(x, 2)");
37     }
38 }
39