1/* 2Copyright 2017 Glen Joseph Fernandes 3(glenjofe@gmail.com) 4 5Distributed under Boost Software License, Version 1.0. 6(See accompanying file LICENSE_1_0.txt or copy at 7http://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 16namespace boost_no_cxx11_pointer_traits { 17 18template<class T> 19struct pointer { 20 template<class U> 21 using rebind = pointer<U>; 22}; 23 24template<class T> 25struct result { }; 26 27template<> 28struct result<pointer<bool> > { 29 static const int value = 0; 30}; 31 32int test() 33{ 34 return result<std::pointer_traits<pointer<int> >::rebind<bool> >::value; 35} 36 37} /* boost_no_cxx11_pointer_traits */ 38