| 
									
										
										
										
											2012-04-22 10:57:10 +00:00
										 |  |  | //  (C) Copyright John Maddock 2012 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | //  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_ALLOCATOR | 
					
						
							|  |  |  | //  TITLE:         C++11 <memory> doesn't have C++0x allocator support | 
					
						
							|  |  |  | //  DESCRIPTION:   The compiler does not support the C++11 allocator features added to <memory> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <memory> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace boost_no_cxx11_allocator { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | int test() | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |    std::pointer_traits<char*>* p = 0; | 
					
						
							| 
									
										
										
										
											2012-12-10 18:39:11 +00:00
										 |  |  |    (void) p; | 
					
						
							| 
									
										
										
										
											2012-04-25 17:18:23 +00:00
										 |  |  |    //std::pointer_safety s = std::relaxed; | 
					
						
							| 
									
										
										
										
											2012-04-22 10:57:10 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-04-25 17:18:23 +00:00
										 |  |  |    //char* (*l_undeclare_reachable)(char *p) = std::undeclare_reachable; | 
					
						
							|  |  |  |    //void (*l_declare_no_pointers)(char *p, size_t n) = std::declare_no_pointers; | 
					
						
							|  |  |  |    //void (*l_undeclare_no_pointers)(char *p, size_t n) = std::undeclare_no_pointers; | 
					
						
							|  |  |  |    //std::pointer_safety (*l_get_pointer_safety)() = std::get_pointer_safety; | 
					
						
							|  |  |  |    //void* (*l_align)(std::size_t alignment, std::size_t size, void *&ptr, std::size_t& space) = std::align; | 
					
						
							| 
									
										
										
										
											2012-04-22 10:57:10 +00:00
										 |  |  |    std::allocator_arg_t aat; | 
					
						
							|  |  |  |    std::uses_allocator<int, std::allocator<int> > ua; | 
					
						
							|  |  |  |    std::allocator_traits<std::allocator<int> > at; | 
					
						
							| 
									
										
										
										
											2014-02-06 13:29:59 +00:00
										 |  |  |    std::allocator<int> ia; | 
					
						
							|  |  |  |    std::allocator_traits<std::allocator<int> >::rebind_alloc<void*> ra(ia); | 
					
						
							|  |  |  |    std::allocator<void*>* pva = &ra; | 
					
						
							| 
									
										
										
										
											2014-05-08 11:53:50 -07:00
										 |  |  |    std::allocator_traits<std::allocator<int> >::rebind_traits<void*>::pointer pt; | 
					
						
							| 
									
										
										
										
											2012-04-22 10:57:10 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-12-10 18:39:11 +00:00
										 |  |  |    (void)aat; | 
					
						
							|  |  |  |    (void)ua; | 
					
						
							|  |  |  |    (void)at; | 
					
						
							| 
									
										
										
										
											2014-02-06 13:29:59 +00:00
										 |  |  |    (void)pva; | 
					
						
							| 
									
										
										
										
											2014-05-08 11:53:50 -07:00
										 |  |  |    (void)pt; | 
					
						
							| 
									
										
										
										
											2012-04-22 10:57:10 +00:00
										 |  |  |    return 0; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } |