1// (C) Copyright John Maddock 2012 2 3// Use, modification and distribution are subject to the 4// Boost Software License, Version 1.0. (See accompanying file 5// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 7// See http://www.boost.org/libs/config for more information. 8 9// MACRO: BOOST_NO_CXX11_ALLOCATOR 10// TITLE: C++11 <memory> doesn't have C++0x allocator support 11// DESCRIPTION: The compiler does not support the C++11 allocator features added to <memory> 12 13#include <memory> 14 15namespace boost_no_cxx11_allocator { 16 17int test() 18{ 19 std::pointer_traits<char*>* p = 0; 20 (void) p; 21 //std::pointer_safety s = std::relaxed; 22 23 //char* (*l_undeclare_reachable)(char *p) = std::undeclare_reachable; 24 //void (*l_declare_no_pointers)(char *p, size_t n) = std::declare_no_pointers; 25 //void (*l_undeclare_no_pointers)(char *p, size_t n) = std::undeclare_no_pointers; 26 //std::pointer_safety (*l_get_pointer_safety)() = std::get_pointer_safety; 27 //void* (*l_align)(std::size_t alignment, std::size_t size, void *&ptr, std::size_t& space) = std::align; 28 std::allocator_arg_t aat; 29 std::uses_allocator<int, std::allocator<int> > ua; 30 std::allocator_traits<std::allocator<int> > at; 31 std::allocator<int> ia; 32 std::allocator_traits<std::allocator<int> >::rebind_alloc<void*> ra(ia); 33 std::allocator<void*>* pva = &ra; 34 std::allocator_traits<std::allocator<int> >::rebind_traits<void*>::pointer pt; 35 36 (void)aat; 37 (void)ua; 38 (void)at; 39 (void)pva; 40 (void)pt; 41 return 0; 42} 43 44} 45