• 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_CHAR32_T
10//  TITLE:         C++0x char32_t unavailable
11//  DESCRIPTION:   The compiler does not support C++0x char32_t
12
13namespace boost_no_cxx11_char32_t {
14
15//  Microsoft VC++ 2010, and possibly other compilers, provides
16//  a typedef for char32_t rather than a new type. We want that
17//  to be an error, so provide an overloaded function that will
18//  be ambiguous if char16_t is just a typedef.
19void f(const char32_t*){}
20void f(const unsigned short*){}
21void f(const unsigned int*){}
22void f(const unsigned long*){}
23
24int test()
25{
26  const char32_t p(0);
27  f(&p);
28  return 0;
29}
30
31}
32