File: boost_no_char16_t.ipp

package info (click to toggle)
boost1.88 1.88.0-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 576,932 kB
  • sloc: cpp: 4,149,234; xml: 136,789; ansic: 35,092; python: 33,910; asm: 5,698; sh: 4,604; ada: 1,681; makefile: 1,633; pascal: 1,139; perl: 1,124; sql: 640; yacc: 478; ruby: 271; java: 77; lisp: 24; csh: 6
file content (32 lines) | stat: -rw-r--r-- 906 bytes parent folder | download | duplicates (17)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

//  (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.

//  MACRO:         BOOST_NO_CXX11_CHAR16_T
//  TITLE:         C++0x char16_t unavailable
//  DESCRIPTION:   The compiler does not support C++0x char16_t

namespace boost_no_cxx11_char16_t {

//  Microsoft VC++ 2010, and possibly other compilers, provides
//  a typedef for char16_t rather than a new type. We want that
//  to be an error, so provide an overloaded function that will
//  be ambiguous if char16_t is just a typedef.
void f(const char16_t*){}
void f(const unsigned short*){}
void f(const unsigned int*){}
void f(const unsigned long*){}

int test()
{
  const char16_t p(0);
  f(&p);
  return 0;
}

}