• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2//  (C) Copyright Beman Dawes 2008
3
4//  Use, modification and distribution are subject to the
5//  Boost Software License, Version 1.0. (See accompanying file
6//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7
8//  See http://www.boost.org/libs/config for more information.
9
10//  MACRO:         BOOST_NO_CXX11_CHAR16_T
11//  TITLE:         C++0x char16_t unavailable
12//  DESCRIPTION:   The compiler does not support C++0x char16_t
13
14namespace boost_no_cxx11_char16_t {
15
16//  Microsoft VC++ 2010, and possibly other compilers, provides
17//  a typedef for char16_t rather than a new type. We want that
18//  to be an error, so provide an overloaded function that will
19//  be ambiguous if char16_t is just a typedef.
20void f(const char16_t*){}
21void f(const unsigned short*){}
22void f(const unsigned int*){}
23void f(const unsigned long*){}
24
25int test()
26{
27  const char16_t p(0);
28  f(&p);
29  return 0;
30}
31
32}
33