// Copyright Jason Rice 2016 // 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 #include #include #include #include #include namespace hana = boost::hana; namespace foo { template struct my_template { }; template struct my_mf { struct type; }; struct my_mf_class { template struct apply { struct type; }; }; } int main() { { std::ostringstream ss; ss << hana::experimental::print( hana::template_ ); BOOST_HANA_RUNTIME_CHECK(std::regex_match(ss.str(), std::regex("template<(?:struct )?foo::my_template>"))); } { std::ostringstream ss; ss << hana::experimental::print( hana::metafunction ); BOOST_HANA_RUNTIME_CHECK(std::regex_match(ss.str(), std::regex("metafunction<(?:struct )?foo::my_mf>"))); } { std::ostringstream ss; ss << hana::experimental::print( hana::metafunction_class ); BOOST_HANA_RUNTIME_CHECK(std::regex_match(ss.str(), std::regex("metafunction_class<(?:struct )?foo::my_mf_class>"))); } }