1 // Copyright Louis Dionne 2013-2017
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/config.hpp>
7 #include <boost/hana/core/is_a.hpp>
8 #include <boost/hana/equal.hpp>
9 #include <boost/hana/integral_constant.hpp>
10 #include <boost/hana/length.hpp>
11 #include <boost/hana/string.hpp>
12 namespace hana = boost::hana;
13 using namespace hana::literals;
14
15
16 // By default, this is disabled
17 #ifdef BOOST_HANA_CONFIG_ENABLE_STRING_UDL
18
19 constexpr auto str = "Hello world!"_s;
20 BOOST_HANA_CONSTANT_CHECK(str == hana::string_c<'H', 'e', 'l', 'l', 'o', ' ',
21 'w', 'o', 'r', 'l', 'd', '!'>);
22
23 BOOST_HANA_CONSTANT_CHECK(hana::is_a<hana::string_tag>(str));
24 BOOST_HANA_CONSTANT_CHECK(hana::length(str) == hana::size_c<12>);
25
26 #endif
27
main()28 int main() { }
29