• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//  (C) Copyright Beman Dawes 2008
2
3//  Use, modification and distribution are subject to the
4//  Boost Software License, Version 1.0. (See accompanying file
5//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6
7//  See http://www.boost.org/libs/config for more information.
8
9//  MACRO:         BOOST_NO_CXX11_UNICODE_LITERALS
10//  TITLE:         C++0x unicode literals unavailable
11//  DESCRIPTION:   The compiler does not support C++0x Unicode literals (N2442)
12
13namespace boost_no_cxx11_unicode_literals {
14
15template <class CharT>
16void quiet_warning(const CharT*){}
17
18int test()
19{
20#if defined(__cpp_char8_type) || defined(__cpp_char8_t)
21   // The change to char8_t in C++20 is a breaking change to the std:
22   const char8_t* c8 = u8"";
23#else
24  const char* c8 = u8"";
25#endif
26  const char16_t* c16 = u"";
27  const char32_t* c32 = U"";
28  quiet_warning(c8);
29  quiet_warning(c16);
30  quiet_warning(c32);
31  return 0;
32}
33
34}
35