Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/detail/allocator_utilities.hpp @ 101:c530137014c0
Update Boost headers (1.58.0)
author | Chris Cannam |
---|---|
date | Mon, 07 Sep 2015 11:12:49 +0100 |
parents | 2665513ce2d3 |
children |
comparison
equal
deleted
inserted
replaced
100:793467b5e61c | 101:c530137014c0 |
---|---|
1 /* Copyright 2003-2009 Joaquin M Lopez Munoz. | 1 /* Copyright 2003-2013 Joaquin M Lopez Munoz. |
2 * Distributed under the Boost Software License, Version 1.0. | 2 * Distributed under the Boost Software License, Version 1.0. |
3 * (See accompanying file LICENSE_1_0.txt or copy at | 3 * (See accompanying file LICENSE_1_0.txt or copy at |
4 * http://www.boost.org/LICENSE_1_0.txt) | 4 * http://www.boost.org/LICENSE_1_0.txt) |
5 * | 5 * |
6 * See Boost website at http://www.boost.org/ | 6 * See Boost website at http://www.boost.org/ |
9 #ifndef BOOST_DETAIL_ALLOCATOR_UTILITIES_HPP | 9 #ifndef BOOST_DETAIL_ALLOCATOR_UTILITIES_HPP |
10 #define BOOST_DETAIL_ALLOCATOR_UTILITIES_HPP | 10 #define BOOST_DETAIL_ALLOCATOR_UTILITIES_HPP |
11 | 11 |
12 #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */ | 12 #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */ |
13 #include <boost/detail/workaround.hpp> | 13 #include <boost/detail/workaround.hpp> |
14 #include <boost/mpl/aux_/msvc_never_true.hpp> | |
15 #include <boost/mpl/eval_if.hpp> | 14 #include <boost/mpl/eval_if.hpp> |
16 #include <boost/type_traits/is_same.hpp> | 15 #include <boost/type_traits/is_same.hpp> |
17 #include <cstddef> | 16 #include <cstddef> |
18 #include <memory> | 17 #include <memory> |
19 #include <new> | 18 #include <new> |
114 typedef partial_std_allocator_wrapper<Type> type; | 113 typedef partial_std_allocator_wrapper<Type> type; |
115 }; | 114 }; |
116 | 115 |
117 /* rebind operation in all other cases */ | 116 /* rebind operation in all other cases */ |
118 | 117 |
119 #if BOOST_WORKAROUND(BOOST_MSVC,<1300) | |
120 /* Workaround for a problem in MSVC with dependent template typedefs | |
121 * when doing rebinding of allocators. | |
122 * Modeled after <boost/mpl/aux_/msvc_dtw.hpp> (thanks, Aleksey!) | |
123 */ | |
124 | |
125 template<typename Allocator> | |
126 struct rebinder | |
127 { | |
128 template<bool> struct fake_allocator:Allocator{}; | |
129 template<> struct fake_allocator<true> | |
130 { | |
131 template<typename Type> struct rebind{}; | |
132 }; | |
133 | |
134 template<typename Type> | |
135 struct result: | |
136 fake_allocator<mpl::aux::msvc_never_true<Allocator>::value>:: | |
137 template rebind<Type> | |
138 { | |
139 }; | |
140 }; | |
141 #else | |
142 template<typename Allocator> | 118 template<typename Allocator> |
143 struct rebinder | 119 struct rebinder |
144 { | 120 { |
145 template<typename Type> | 121 template<typename Type> |
146 struct result | 122 struct result |
147 { | 123 { |
148 typedef typename Allocator::BOOST_NESTED_TEMPLATE | 124 typedef typename Allocator::BOOST_NESTED_TEMPLATE |
149 rebind<Type>::other other; | 125 rebind<Type>::other other; |
150 }; | 126 }; |
151 }; | 127 }; |
152 #endif | |
153 | 128 |
154 template<typename Allocator,typename Type> | 129 template<typename Allocator,typename Type> |
155 struct compliant_allocator_rebind_to | 130 struct compliant_allocator_rebind_to |
156 { | 131 { |
157 typedef typename rebinder<Allocator>:: | 132 typedef typename rebinder<Allocator>:: |