]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/config/test/boost_no_cxx11_pointer_traits.ipp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / config / test / boost_no_cxx11_pointer_traits.ipp
1 /*
2 Copyright 2017 Glen Joseph Fernandes
3 (glenjofe@gmail.com)
4
5 Distributed under Boost Software License, Version 1.0.
6 (See accompanying file LICENSE_1_0.txt or copy at
7 http://www.boost.org/LICENSE_1_0.txt)
8 */
9
10 // MACRO: BOOST_NO_CXX11_POINTER_TRAITS
11 // TITLE: C++11 <memory> lacks a correct std::pointer_traits
12 // DESCRIPTION: The standard library lacks a working std::pointer_traits.
13
14 #include <memory>
15
16 namespace boost_no_cxx11_pointer_traits {
17
18 template<class T>
19 struct pointer {
20 template<class U>
21 using rebind = pointer<bool>;
22 };
23
24 template<class T>
25 struct result { };
26
27 template<>
28 struct result<pointer<bool> > {
29 static const int value = 0;
30 };
31
32 int test()
33 {
34 return result<std::pointer_traits<pointer<int> >::rebind<char> >::value;
35 }
36
37 } /* boost_no_cxx11_pointer_traits */