Support C++03 implementations that require reference and const_pointer

This commit is contained in:
Glen Fernandes
2019-04-27 06:15:24 -04:00
parent 5a549b8b22
commit 151f2cf645
3 changed files with 95 additions and 3 deletions
+5 -3
View File
@@ -21,9 +21,8 @@ The header <boost/core/default_allocator.hpp> provides the class template
* Like C++2a's `std::allocator`, does not provide members such as `construct()`
and `destroy()` to be eligible for optimizations by allocator-aware code that
detects the absence of these members to provide more optimal construction of
objects.
* Supports `BOOST_NO_EXCEPTIONS`.
detects the absence of these members to provide more optimal construction.
* Supports `BOOST_NO_EXCEPTIONS` in allocation.
* Does not have `std` as an associated namespace.
[endsect]
@@ -37,6 +36,9 @@ template<class T>
struct default_allocator {
typedef T value_type;
typedef T* pointer;
typedef const T* const_pointer;
typedef std::add_lvalue_reference_t<T> reference;
typedef std::add_lvalue_reference_t<const T> const_reference;
typedef std::size_t size_type;
typedef std::ptrdiff_t difference_type;
typedef ``['true_type]`` propagate_on_container_move_assignment;