]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/test/experimental/printable/tuple.cpp
8c484dae52c3715feb6984cc5ee5097c83c604d7
1 // Copyright Louis Dionne 2013-2016
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)
5 #include <boost/hana/assert.hpp>
6 #include <boost/hana/experimental/printable.hpp>
7 #include <boost/hana/tuple.hpp>
11 namespace hana
= boost::hana
;
16 std::ostringstream ss
;
17 ss
<< hana::experimental::print(hana::make_tuple());
18 BOOST_HANA_RUNTIME_CHECK(ss
.str() == "()");
22 std::ostringstream ss
;
23 ss
<< hana::experimental::print(hana::make_tuple(1));
24 BOOST_HANA_RUNTIME_CHECK(ss
.str() == "(1)");
28 std::ostringstream ss
;
29 ss
<< hana::experimental::print(hana::make_tuple(1, 2));
30 BOOST_HANA_RUNTIME_CHECK(ss
.str() == "(1, 2)");
34 std::ostringstream ss
;
35 ss
<< hana::experimental::print(hana::make_tuple(1, '2', "3456"));
36 BOOST_HANA_RUNTIME_CHECK(ss
.str() == "(1, 2, 3456)");
40 std::ostringstream ss
;
41 ss
<< hana::experimental::print(hana::make_tuple(1, '2', hana::make_tuple()));
42 BOOST_HANA_RUNTIME_CHECK(ss
.str() == "(1, 2, ())");
46 std::ostringstream ss
;
47 ss
<< hana::experimental::print(hana::make_tuple(1, '2', hana::make_tuple(3.3, '4')));
48 BOOST_HANA_RUNTIME_CHECK(ss
.str() == "(1, 2, (3.3, 4))");