| 1 | // Copyright Jason Rice 2015 |
|---|---|
| 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/optional.hpp> |
| 9 | |
| 10 | #include <sstream> |
| 11 | namespace hana = boost::hana; |
| 12 | |
| 13 | |
| 14 | int main() { |
| 15 | { |
| 16 | std::ostringstream ss; |
| 17 | ss << hana::experimental::print( |
| 18 | hana::just(hana::int_c<5>) |
| 19 | ); |
| 20 | BOOST_HANA_RUNTIME_CHECK(ss.str() == "just(5)"); |
| 21 | } |
| 22 | { |
| 23 | std::ostringstream ss; |
| 24 | ss << hana::experimental::print( |
| 25 | hana::nothing |
| 26 | ); |
| 27 | BOOST_HANA_RUNTIME_CHECK(ss.str() == "nothing"); |
| 28 | } |
| 29 | } |
| 30 |
