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/equal.hpp>
7 #include <boost/hana/plus.hpp>
8 #include <boost/hana/string.hpp>
9 namespace hana = boost::hana;
10
11
main()12 int main() {
13 BOOST_HANA_CONSTANT_CHECK(hana::equal(
14 hana::plus(BOOST_HANA_STRING(""), BOOST_HANA_STRING("")),
15 BOOST_HANA_STRING("")
16 ));
17 BOOST_HANA_CONSTANT_CHECK(hana::equal(
18 hana::plus(BOOST_HANA_STRING("abcd"), BOOST_HANA_STRING("")),
19 BOOST_HANA_STRING("abcd")
20 ));
21 BOOST_HANA_CONSTANT_CHECK(hana::equal(
22 hana::plus(BOOST_HANA_STRING(""), BOOST_HANA_STRING("abcd")),
23 BOOST_HANA_STRING("abcd")
24 ));
25 BOOST_HANA_CONSTANT_CHECK(hana::equal(
26 hana::plus(BOOST_HANA_STRING("abcd"), BOOST_HANA_STRING("efg")),
27 BOOST_HANA_STRING("abcdefg")
28 ));
29
30 // check operator
31 BOOST_HANA_CONSTANT_CHECK(hana::equal(
32 BOOST_HANA_STRING("abc") + BOOST_HANA_STRING("def"),
33 BOOST_HANA_STRING("abcdef")
34 ));
35 }
36