diff -Naur boost_1_47_0-orig/boost/ptr_container/detail/void_ptr_iterator.hpp boost_1_47_0/boost/ptr_container/detail/void_ptr_iterator.hpp
old
|
new
|
|
161 | 161 | return r; |
162 | 162 | } |
163 | 163 | |
| 164 | |
| 165 | namespace ptr_container_detail |
| 166 | { |
| 167 | template<typename T, typename U> |
| 168 | struct is_compatible |
| 169 | { |
| 170 | static const bool value = boost::is_same< typename boost::remove_const<T>::type, typename boost::remove_const<U>::type >::value; |
| 171 | }; |
| 172 | } |
| 173 | |
| 174 | |
164 | 175 | template< class VoidIter, class T, class VoidIterU, class U > |
165 | | inline BOOST_DEDUCED_TYPENAME void_ptr_iterator<VoidIter,T>::difference_type |
| 176 | inline BOOST_DEDUCED_TYPENAME boost::enable_if< |
| 177 | ptr_container_detail::is_compatible<T, U>, |
| 178 | BOOST_DEDUCED_TYPENAME void_ptr_iterator<VoidIter,T>::difference_type |
| 179 | >::type |
166 | 180 | operator-( void_ptr_iterator<VoidIter,T> l, |
167 | 181 | void_ptr_iterator<VoidIterU,U> r ) |
168 | 182 | |
… |
… |
|
173 | 187 | |
174 | 188 | |
175 | 189 | template< class VoidIterT, class T, class VoidIterU, class U > |
176 | | inline bool operator==( const void_ptr_iterator<VoidIterT,T>& l, |
| 190 | inline BOOST_DEDUCED_TYPENAME boost::enable_if< |
| 191 | ptr_container_detail::is_compatible<T, U>, |
| 192 | bool |
| 193 | >::type |
| 194 | operator==( const void_ptr_iterator<VoidIterT,T>& l, |
177 | 195 | const void_ptr_iterator<VoidIterU,U>& r ) |
178 | 196 | { |
179 | 197 | return l.base() == r.base(); |
… |
… |
|
182 | 200 | |
183 | 201 | |
184 | 202 | template< class VoidIterT, class T, class VoidIterU, class U > |
185 | | inline bool operator!=( const void_ptr_iterator<VoidIterT,T>& l, |
| 203 | inline BOOST_DEDUCED_TYPENAME boost::enable_if< |
| 204 | ptr_container_detail::is_compatible<T, U>, |
| 205 | bool |
| 206 | >::type |
| 207 | operator!=( const void_ptr_iterator<VoidIterT,T>& l, |
186 | 208 | const void_ptr_iterator<VoidIterU,U>& r ) |
187 | 209 | { |
188 | 210 | return l.base() != r.base(); |
… |
… |
|
191 | 213 | |
192 | 214 | |
193 | 215 | template< class VoidIterT, class T, class VoidIterU, class U > |
194 | | inline bool operator<( const void_ptr_iterator<VoidIterT,T>& l, |
| 216 | inline BOOST_DEDUCED_TYPENAME boost::enable_if< |
| 217 | ptr_container_detail::is_compatible<T, U>, |
| 218 | bool |
| 219 | >::type |
| 220 | operator<( const void_ptr_iterator<VoidIterT,T>& l, |
195 | 221 | const void_ptr_iterator<VoidIterU,U>& r ) |
196 | 222 | { |
197 | 223 | return l.base() < r.base(); |
… |
… |
|
200 | 226 | |
201 | 227 | |
202 | 228 | template< class VoidIterT, class T, class VoidIterU, class U > |
203 | | inline bool operator<=( const void_ptr_iterator<VoidIterT,T>& l, |
| 229 | inline BOOST_DEDUCED_TYPENAME boost::enable_if< |
| 230 | ptr_container_detail::is_compatible<T, U>, |
| 231 | bool |
| 232 | >::type |
| 233 | operator<=( const void_ptr_iterator<VoidIterT,T>& l, |
204 | 234 | const void_ptr_iterator<VoidIterU,U>& r ) |
205 | 235 | { |
206 | 236 | return l.base() <= r.base(); |
… |
… |
|
209 | 239 | |
210 | 240 | |
211 | 241 | template< class VoidIterT, class T, class VoidIterU, class U > |
212 | | inline bool operator>( const void_ptr_iterator<VoidIterT,T>& l, |
| 242 | inline BOOST_DEDUCED_TYPENAME boost::enable_if< |
| 243 | ptr_container_detail::is_compatible<T, U>, |
| 244 | bool |
| 245 | >::type |
| 246 | operator>( const void_ptr_iterator<VoidIterT,T>& l, |
213 | 247 | const void_ptr_iterator<VoidIterU,U>& r ) |
214 | 248 | { |
215 | 249 | return l.base() > r.base(); |
… |
… |
|
218 | 252 | |
219 | 253 | |
220 | 254 | template< class VoidIterT, class T, class VoidIterU, class U > |
221 | | inline bool operator>=( const void_ptr_iterator<VoidIterT,T>& l, |
| 255 | inline BOOST_DEDUCED_TYPENAME boost::enable_if< |
| 256 | ptr_container_detail::is_compatible<T, U>, |
| 257 | bool |
| 258 | >::type |
| 259 | operator>=( const void_ptr_iterator<VoidIterT,T>& l, |
222 | 260 | const void_ptr_iterator<VoidIterU,U>& r ) |
223 | 261 | { |
224 | 262 | return l.base() >= r.base(); |