diff options
Diffstat (limited to 'src/boost/libs/hana/test/experimental/printable/type.cpp')
-rw-r--r-- | src/boost/libs/hana/test/experimental/printable/type.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/boost/libs/hana/test/experimental/printable/type.cpp b/src/boost/libs/hana/test/experimental/printable/type.cpp new file mode 100644 index 000000000..718cdc0c1 --- /dev/null +++ b/src/boost/libs/hana/test/experimental/printable/type.cpp @@ -0,0 +1,35 @@ +// Copyright Louis Dionne 2013-2017 +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) + +#include <boost/hana/experimental/printable.hpp> +#include <boost/hana/type.hpp> + +#include <iostream> +namespace hana = boost::hana; + + +template <typename ...T> +struct Template { }; + +int main() { + // Since demangling may not always be available, and since that's not + // our job to test this (but Boost.Core's job), we don't test the + // actual demangling of types. We merely print a type to make sure + // things don't blow up stupidly, but we can't really test more than + // that. + + std::cout << hana::experimental::print(hana::type_c<void>) << std::endl; + + std::cout << hana::experimental::print(hana::type_c<int>) << std::endl; + + std::cout << hana::experimental::print(hana::type_c<int const>) << std::endl; + + std::cout << hana::experimental::print(hana::type_c<int&>) << std::endl; + + std::cout << hana::experimental::print(hana::type_c<int const&>) << std::endl; + + std::cout << hana::experimental::print(hana::type_c<int(&)[]>) << std::endl; + + std::cout << hana::experimental::print(hana::type_c<Template<void, char const*>>) << std::endl; +} |