// 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 #include #include #include namespace hana = boost::hana; static_assert(hana::is_convertible{}, ""); static_assert(!hana::is_embedded{}, ""); int main() { BOOST_HANA_RUNTIME_CHECK(std::strcmp( hana::to(BOOST_HANA_STRING("")), "" ) == 0); BOOST_HANA_RUNTIME_CHECK(std::strcmp( hana::to(BOOST_HANA_STRING("a")), "a" ) == 0); BOOST_HANA_RUNTIME_CHECK(std::strcmp( hana::to(BOOST_HANA_STRING("ab")), "ab" ) == 0); BOOST_HANA_RUNTIME_CHECK(std::strcmp( hana::to(BOOST_HANA_STRING("abc")), "abc" ) == 0); BOOST_HANA_RUNTIME_CHECK(std::strcmp( hana::to(BOOST_HANA_STRING("abcd")), "abcd" ) == 0); // make sure we can turn a non-constexpr hana::string // into a constexpr char const* auto str = BOOST_HANA_STRING("abcdef"); constexpr char const* c_str = hana::to(str); (void)c_str; }