]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/test/string/udl.cpp
899612b221ca0d3d6c0483ad23df00daeeb76f4a
[ceph.git] / ceph / src / boost / libs / hana / test / string / udl.cpp
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/string.hpp>
8
9 #include <type_traits>
10 namespace hana = boost::hana;
11
12
13 int main() {
14 // Check the _s user-defined literal
15 #ifdef BOOST_HANA_CONFIG_ENABLE_STRING_UDL
16
17 using namespace hana::literals;
18
19 constexpr auto s1 = "abcd"_s;
20 constexpr auto s2 = hana::string_c<'a', 'b', 'c', 'd'>;
21
22 static_assert(std::is_same<decltype(s1), decltype(s2)>::value, "");
23 #endif
24 }