2009-03-04 14:28:36 +00:00
|
|
|
// (C) Copyright Beman Dawes 2008
|
|
|
|
|
|
|
|
// Use, modification and distribution are subject to the
|
|
|
|
// Boost Software License, Version 1.0. (See accompanying file
|
|
|
|
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
|
|
|
|
// See http://www.boost.org/libs/config for more information.
|
|
|
|
|
2012-07-15 15:59:05 +00:00
|
|
|
// MACRO: BOOST_NO_CXX11_UNICODE_LITERALS
|
2009-03-04 14:28:36 +00:00
|
|
|
// TITLE: C++0x unicode literals unavailable
|
2009-10-13 12:56:44 +00:00
|
|
|
// DESCRIPTION: The compiler does not support C++0x Unicode literals (N2442)
|
2009-03-04 14:28:36 +00:00
|
|
|
|
2012-07-15 15:59:05 +00:00
|
|
|
namespace boost_no_cxx11_unicode_literals {
|
2009-03-04 14:28:36 +00:00
|
|
|
|
2013-02-24 19:07:59 +00:00
|
|
|
template <class CharT>
|
|
|
|
void quiet_warning(const CharT*){}
|
2009-10-13 12:56:44 +00:00
|
|
|
|
2009-03-04 14:28:36 +00:00
|
|
|
int test()
|
|
|
|
{
|
2019-06-27 12:48:00 +01:00
|
|
|
#if defined(__cpp_char8_type) || defined(__cpp_char8_t)
|
2019-04-16 19:37:15 +01:00
|
|
|
// The change to char8_t in C++20 is a breaking change to the std:
|
|
|
|
const char8_t* c8 = u8"";
|
|
|
|
#else
|
2009-10-13 12:56:44 +00:00
|
|
|
const char* c8 = u8"";
|
2019-04-16 19:37:15 +01:00
|
|
|
#endif
|
2011-12-23 17:17:31 +00:00
|
|
|
const char16_t* c16 = u"";
|
|
|
|
const char32_t* c32 = U"";
|
|
|
|
quiet_warning(c8);
|
2013-02-24 19:07:59 +00:00
|
|
|
quiet_warning(c16);
|
|
|
|
quiet_warning(c32);
|
2009-03-04 14:28:36 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|