diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
commit | 19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch) | |
tree | 42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/boost/libs/config/test/boost_no_char16_t.ipp | |
parent | Initial commit. (diff) | |
download | ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.tar.xz ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.zip |
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/boost/libs/config/test/boost_no_char16_t.ipp')
-rw-r--r-- | src/boost/libs/config/test/boost_no_char16_t.ipp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/boost/libs/config/test/boost_no_char16_t.ipp b/src/boost/libs/config/test/boost_no_char16_t.ipp new file mode 100644 index 000000000..4efff95e6 --- /dev/null +++ b/src/boost/libs/config/test/boost_no_char16_t.ipp @@ -0,0 +1,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; +} + +} |