| 1 | // Copyright Louis Dionne 2013-2022 |
|---|---|
| 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/experimental/printable.hpp> |
| 6 | #include <boost/hana/type.hpp> |
| 7 | |
| 8 | #include <iostream> |
| 9 | namespace hana = boost::hana; |
| 10 | |
| 11 | |
| 12 | template <typename ...T> |
| 13 | struct Template { }; |
| 14 | |
| 15 | int main() { |
| 16 | // Since demangling may not always be available, and since that's not |
| 17 | // our job to test this (but Boost.Core's job), we don't test the |
| 18 | // actual demangling of types. We merely print a type to make sure |
| 19 | // things don't blow up stupidly, but we can't really test more than |
| 20 | // that. |
| 21 | |
| 22 | std::cout << hana::experimental::print(hana::type_c<void>) << std::endl; |
| 23 | |
| 24 | std::cout << hana::experimental::print(hana::type_c<int>) << std::endl; |
| 25 | |
| 26 | std::cout << hana::experimental::print(hana::type_c<int const>) << std::endl; |
| 27 | |
| 28 | std::cout << hana::experimental::print(hana::type_c<int&>) << std::endl; |
| 29 | |
| 30 | std::cout << hana::experimental::print(hana::type_c<int const&>) << std::endl; |
| 31 | |
| 32 | std::cout << hana::experimental::print(hana::type_c<int(&)[]>) << std::endl; |
| 33 | |
| 34 | std::cout << hana::experimental::print(hana::type_c<Template<void, char const*>>) << std::endl; |
| 35 | } |
| 36 |
