Add BOOST_CONTAINER_FORCEINLINE in more places

This commit is contained in:
Ion Gaztañaga
2020-05-25 00:14:15 +02:00
parent 39edf046d5
commit 649d6d0478
5 changed files with 118 additions and 118 deletions

View File

@@ -27,30 +27,30 @@ namespace container {
namespace dtl { namespace dtl {
template<class AllocatorType> template<class AllocatorType>
inline void swap_alloc(AllocatorType &, AllocatorType &, dtl::false_type) BOOST_CONTAINER_FORCEINLINE void swap_alloc(AllocatorType &, AllocatorType &, dtl::false_type)
BOOST_NOEXCEPT_OR_NOTHROW BOOST_NOEXCEPT_OR_NOTHROW
{} {}
template<class AllocatorType> template<class AllocatorType>
inline void swap_alloc(AllocatorType &l, AllocatorType &r, dtl::true_type) BOOST_CONTAINER_FORCEINLINE void swap_alloc(AllocatorType &l, AllocatorType &r, dtl::true_type)
{ boost::adl_move_swap(l, r); } { boost::adl_move_swap(l, r); }
template<class AllocatorType> template<class AllocatorType>
inline void assign_alloc(AllocatorType &, const AllocatorType &, dtl::false_type) BOOST_CONTAINER_FORCEINLINE void assign_alloc(AllocatorType &, const AllocatorType &, dtl::false_type)
BOOST_NOEXCEPT_OR_NOTHROW BOOST_NOEXCEPT_OR_NOTHROW
{} {}
template<class AllocatorType> template<class AllocatorType>
inline void assign_alloc(AllocatorType &l, const AllocatorType &r, dtl::true_type) BOOST_CONTAINER_FORCEINLINE void assign_alloc(AllocatorType &l, const AllocatorType &r, dtl::true_type)
{ l = r; } { l = r; }
template<class AllocatorType> template<class AllocatorType>
inline void move_alloc(AllocatorType &, AllocatorType &, dtl::false_type) BOOST_CONTAINER_FORCEINLINE void move_alloc(AllocatorType &, AllocatorType &, dtl::false_type)
BOOST_NOEXCEPT_OR_NOTHROW BOOST_NOEXCEPT_OR_NOTHROW
{} {}
template<class AllocatorType> template<class AllocatorType>
inline void move_alloc(AllocatorType &l, AllocatorType &r, dtl::true_type) BOOST_CONTAINER_FORCEINLINE void move_alloc(AllocatorType &l, AllocatorType &r, dtl::true_type)
{ l = ::boost::move(r); } { l = ::boost::move(r); }
} //namespace dtl { } //namespace dtl {

View File

@@ -110,7 +110,7 @@ template < typename ConstructAlloc
, typename T , typename T
, class ...Args , class ...Args
> >
inline typename dtl::enable_if_and BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_and
< void < void
, dtl::is_not_pair<T> , dtl::is_not_pair<T>
, dtl::not_< uses_allocator<T, ArgAlloc> > , dtl::not_< uses_allocator<T, ArgAlloc> >
@@ -127,7 +127,7 @@ template < typename ConstructAlloc
, typename T , typename T
, class ...Args , class ...Args
> >
inline typename dtl::enable_if_and BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_and
< void < void
, dtl::is_not_pair<T> , dtl::is_not_pair<T>
, uses_allocator<T, ArgAlloc> , uses_allocator<T, ArgAlloc>
@@ -146,7 +146,7 @@ template < typename ConstructAlloc
, typename T , typename T
, class ...Args , class ...Args
> >
inline typename dtl::enable_if_and BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_and
< void < void
, dtl::is_not_pair<T> , dtl::is_not_pair<T>
, uses_allocator<T, ArgAlloc> , uses_allocator<T, ArgAlloc>
@@ -162,7 +162,7 @@ inline typename dtl::enable_if_and
#define BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE(N) \ #define BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE(N) \
template <typename ConstructAlloc, typename ArgAlloc, typename T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\ template <typename ConstructAlloc, typename ArgAlloc, typename T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
inline typename dtl::enable_if_and\ BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_and\
< void\ < void\
, dtl::is_not_pair<T>\ , dtl::is_not_pair<T>\
, dtl::not_<uses_allocator<T, ArgAlloc> >\ , dtl::not_<uses_allocator<T, ArgAlloc> >\
@@ -179,7 +179,7 @@ BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR
#define BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE(N) \ #define BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE(N) \
template < typename ConstructAlloc, typename ArgAlloc, typename T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\ template < typename ConstructAlloc, typename ArgAlloc, typename T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
inline typename dtl::enable_if_and\ BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_and\
< void\ < void\
, dtl::is_not_pair<T>\ , dtl::is_not_pair<T>\
, uses_allocator<T, ArgAlloc>\ , uses_allocator<T, ArgAlloc>\
@@ -197,7 +197,7 @@ BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR
#define BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE(N) \ #define BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE(N) \
template < typename ConstructAlloc, typename ArgAlloc, typename T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\ template < typename ConstructAlloc, typename ArgAlloc, typename T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
inline typename dtl::enable_if_and\ BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_and\
< void\ < void\
, dtl::is_not_pair<T>\ , dtl::is_not_pair<T>\
, uses_allocator<T, ArgAlloc>\ , uses_allocator<T, ArgAlloc>\

View File

@@ -354,7 +354,7 @@ class list
//! <b>Throws</b>: Nothing. //! <b>Throws</b>: Nothing.
//! //!
//! <b>Complexity</b>: Linear to the number of elements. //! <b>Complexity</b>: Linear to the number of elements.
~list() BOOST_NOEXCEPT_OR_NOTHROW BOOST_CONTAINER_FORCEINLINE ~list() BOOST_NOEXCEPT_OR_NOTHROW
{} //AllocHolder clears the list {} //AllocHolder clears the list
//! <b>Effects</b>: Makes *this contain the same elements as x. //! <b>Effects</b>: Makes *this contain the same elements as x.
@@ -430,9 +430,9 @@ class list
//! <b>Throws</b>: If memory allocation throws or T's copy constructor throws. //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
//! //!
//! <b>Complexity</b>: Linear to the number of elements in x. //! <b>Complexity</b>: Linear to the number of elements in x.
list& operator=(std::initializer_list<value_type> il) BOOST_CONTAINER_FORCEINLINE list& operator=(std::initializer_list<value_type> il)
{ {
assign(il.begin(), il.end()); this->assign(il.begin(), il.end());
return *this; return *this;
} }
#endif #endif
@@ -442,7 +442,7 @@ class list
//! <b>Throws</b>: If memory allocation throws or T's copy constructor throws. //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
//! //!
//! <b>Complexity</b>: Linear to n. //! <b>Complexity</b>: Linear to n.
void assign(size_type n, const T& val) BOOST_CONTAINER_FORCEINLINE void assign(size_type n, const T& val)
{ {
typedef constant_iterator<value_type, difference_type> cvalue_iterator; typedef constant_iterator<value_type, difference_type> cvalue_iterator;
return this->assign(cvalue_iterator(val, n), cvalue_iterator()); return this->assign(cvalue_iterator(val, n), cvalue_iterator());
@@ -479,8 +479,8 @@ class list
//! T's constructor from dereferencing std::initializer_list iterator throws. //! T's constructor from dereferencing std::initializer_list iterator throws.
//! //!
//! <b>Complexity</b>: Linear to n. //! <b>Complexity</b>: Linear to n.
void assign(std::initializer_list<value_type> il) BOOST_CONTAINER_FORCEINLINE void assign(std::initializer_list<value_type> il)
{ assign(il.begin(), il.end()); } { this->assign(il.begin(), il.end()); }
#endif #endif
//! <b>Effects</b>: Returns a copy of the internal allocator. //! <b>Effects</b>: Returns a copy of the internal allocator.
@@ -488,7 +488,7 @@ class list
//! <b>Throws</b>: If allocator's copy constructor throws. //! <b>Throws</b>: If allocator's copy constructor throws.
//! //!
//! <b>Complexity</b>: Constant. //! <b>Complexity</b>: Constant.
allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_CONTAINER_FORCEINLINE allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
{ return allocator_type(this->node_alloc()); } { return allocator_type(this->node_alloc()); }
//! <b>Effects</b>: Returns a reference to the internal allocator. //! <b>Effects</b>: Returns a reference to the internal allocator.
@@ -498,7 +498,7 @@ class list
//! <b>Complexity</b>: Constant. //! <b>Complexity</b>: Constant.
//! //!
//! <b>Note</b>: Non-standard extension. //! <b>Note</b>: Non-standard extension.
stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW BOOST_CONTAINER_FORCEINLINE stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
{ return this->node_alloc(); } { return this->node_alloc(); }
//! <b>Effects</b>: Returns a reference to the internal allocator. //! <b>Effects</b>: Returns a reference to the internal allocator.
@@ -508,7 +508,7 @@ class list
//! <b>Complexity</b>: Constant. //! <b>Complexity</b>: Constant.
//! //!
//! <b>Note</b>: Non-standard extension. //! <b>Note</b>: Non-standard extension.
const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_CONTAINER_FORCEINLINE const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
{ return this->node_alloc(); } { return this->node_alloc(); }
////////////////////////////////////////////// //////////////////////////////////////////////
@@ -522,7 +522,7 @@ class list
//! <b>Throws</b>: Nothing. //! <b>Throws</b>: Nothing.
//! //!
//! <b>Complexity</b>: Constant. //! <b>Complexity</b>: Constant.
iterator begin() BOOST_NOEXCEPT_OR_NOTHROW BOOST_CONTAINER_FORCEINLINE iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
{ return iterator(this->icont().begin()); } { return iterator(this->icont().begin()); }
//! <b>Effects</b>: Returns a const_iterator to the first element contained in the list. //! <b>Effects</b>: Returns a const_iterator to the first element contained in the list.
@@ -530,7 +530,7 @@ class list
//! <b>Throws</b>: Nothing. //! <b>Throws</b>: Nothing.
//! //!
//! <b>Complexity</b>: Constant. //! <b>Complexity</b>: Constant.
const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_CONTAINER_FORCEINLINE const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
{ return this->cbegin(); } { return this->cbegin(); }
//! <b>Effects</b>: Returns an iterator to the end of the list. //! <b>Effects</b>: Returns an iterator to the end of the list.
@@ -538,7 +538,7 @@ class list
//! <b>Throws</b>: Nothing. //! <b>Throws</b>: Nothing.
//! //!
//! <b>Complexity</b>: Constant. //! <b>Complexity</b>: Constant.
iterator end() BOOST_NOEXCEPT_OR_NOTHROW BOOST_CONTAINER_FORCEINLINE iterator end() BOOST_NOEXCEPT_OR_NOTHROW
{ return iterator(this->icont().end()); } { return iterator(this->icont().end()); }
//! <b>Effects</b>: Returns a const_iterator to the end of the list. //! <b>Effects</b>: Returns a const_iterator to the end of the list.
@@ -546,7 +546,7 @@ class list
//! <b>Throws</b>: Nothing. //! <b>Throws</b>: Nothing.
//! //!
//! <b>Complexity</b>: Constant. //! <b>Complexity</b>: Constant.
const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_CONTAINER_FORCEINLINE const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
{ return this->cend(); } { return this->cend(); }
//! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning //! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
@@ -555,7 +555,7 @@ class list
//! <b>Throws</b>: Nothing. //! <b>Throws</b>: Nothing.
//! //!
//! <b>Complexity</b>: Constant. //! <b>Complexity</b>: Constant.
reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW BOOST_CONTAINER_FORCEINLINE reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
{ return reverse_iterator(end()); } { return reverse_iterator(end()); }
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
@@ -564,7 +564,7 @@ class list
//! <b>Throws</b>: Nothing. //! <b>Throws</b>: Nothing.
//! //!
//! <b>Complexity</b>: Constant. //! <b>Complexity</b>: Constant.
const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
{ return this->crbegin(); } { return this->crbegin(); }
//! <b>Effects</b>: Returns a reverse_iterator pointing to the end //! <b>Effects</b>: Returns a reverse_iterator pointing to the end
@@ -573,7 +573,7 @@ class list
//! <b>Throws</b>: Nothing. //! <b>Throws</b>: Nothing.
//! //!
//! <b>Complexity</b>: Constant. //! <b>Complexity</b>: Constant.
reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW BOOST_CONTAINER_FORCEINLINE reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
{ return reverse_iterator(begin()); } { return reverse_iterator(begin()); }
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
@@ -582,7 +582,7 @@ class list
//! <b>Throws</b>: Nothing. //! <b>Throws</b>: Nothing.
//! //!
//! <b>Complexity</b>: Constant. //! <b>Complexity</b>: Constant.
const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
{ return this->crend(); } { return this->crend(); }
//! <b>Effects</b>: Returns a const_iterator to the first element contained in the list. //! <b>Effects</b>: Returns a const_iterator to the first element contained in the list.
@@ -590,7 +590,7 @@ class list
//! <b>Throws</b>: Nothing. //! <b>Throws</b>: Nothing.
//! //!
//! <b>Complexity</b>: Constant. //! <b>Complexity</b>: Constant.
const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_CONTAINER_FORCEINLINE const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
{ return const_iterator(this->non_const_icont().begin()); } { return const_iterator(this->non_const_icont().begin()); }
//! <b>Effects</b>: Returns a const_iterator to the end of the list. //! <b>Effects</b>: Returns a const_iterator to the end of the list.
@@ -598,7 +598,7 @@ class list
//! <b>Throws</b>: Nothing. //! <b>Throws</b>: Nothing.
//! //!
//! <b>Complexity</b>: Constant. //! <b>Complexity</b>: Constant.
const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_CONTAINER_FORCEINLINE const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
{ return const_iterator(this->non_const_icont().end()); } { return const_iterator(this->non_const_icont().end()); }
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
@@ -607,7 +607,7 @@ class list
//! <b>Throws</b>: Nothing. //! <b>Throws</b>: Nothing.
//! //!
//! <b>Complexity</b>: Constant. //! <b>Complexity</b>: Constant.
const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
{ return const_reverse_iterator(this->cend()); } { return const_reverse_iterator(this->cend()); }
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
@@ -616,7 +616,7 @@ class list
//! <b>Throws</b>: Nothing. //! <b>Throws</b>: Nothing.
//! //!
//! <b>Complexity</b>: Constant. //! <b>Complexity</b>: Constant.
const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
{ return const_reverse_iterator(this->cbegin()); } { return const_reverse_iterator(this->cbegin()); }
////////////////////////////////////////////// //////////////////////////////////////////////
@@ -630,7 +630,7 @@ class list
//! <b>Throws</b>: Nothing. //! <b>Throws</b>: Nothing.
//! //!
//! <b>Complexity</b>: Constant. //! <b>Complexity</b>: Constant.
bool empty() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_CONTAINER_FORCEINLINE bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
{ return !this->size(); } { return !this->size(); }
//! <b>Effects</b>: Returns the number of the elements contained in the list. //! <b>Effects</b>: Returns the number of the elements contained in the list.
@@ -638,7 +638,7 @@ class list
//! <b>Throws</b>: Nothing. //! <b>Throws</b>: Nothing.
//! //!
//! <b>Complexity</b>: Constant. //! <b>Complexity</b>: Constant.
size_type size() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_CONTAINER_FORCEINLINE size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
{ return this->icont().size(); } { return this->icont().size(); }
//! <b>Effects</b>: Returns the largest possible size of the list. //! <b>Effects</b>: Returns the largest possible size of the list.
@@ -646,7 +646,7 @@ class list
//! <b>Throws</b>: Nothing. //! <b>Throws</b>: Nothing.
//! //!
//! <b>Complexity</b>: Constant. //! <b>Complexity</b>: Constant.
size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_CONTAINER_FORCEINLINE size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
{ return AllocHolder::max_size(); } { return AllocHolder::max_size(); }
//! <b>Effects</b>: Inserts or erases elements at the end such that //! <b>Effects</b>: Inserts or erases elements at the end such that

View File

@@ -79,10 +79,10 @@ struct outermost_allocator_imp
{ {
typedef MaybeScopedAlloc type; typedef MaybeScopedAlloc type;
static type &get(MaybeScopedAlloc &a) BOOST_CONTAINER_FORCEINLINE static type &get(MaybeScopedAlloc &a)
{ return a; } { return a; }
static const type &get(const MaybeScopedAlloc &a) BOOST_CONTAINER_FORCEINLINE static const type &get(const MaybeScopedAlloc &a)
{ return a; } { return a; }
}; };
@@ -92,10 +92,10 @@ struct outermost_allocator_imp<MaybeScopedAlloc, true>
typedef typename MaybeScopedAlloc::outer_allocator_type outer_type; typedef typename MaybeScopedAlloc::outer_allocator_type outer_type;
typedef typename outermost_allocator_type_impl<outer_type>::type type; typedef typename outermost_allocator_type_impl<outer_type>::type type;
static type &get(MaybeScopedAlloc &a) BOOST_CONTAINER_FORCEINLINE static type &get(MaybeScopedAlloc &a)
{ return outermost_allocator_imp<outer_type>::get(a.outer_allocator()); } { return outermost_allocator_imp<outer_type>::get(a.outer_allocator()); }
static const type &get(const MaybeScopedAlloc &a) BOOST_CONTAINER_FORCEINLINE static const type &get(const MaybeScopedAlloc &a)
{ return outermost_allocator_imp<outer_type>::get(a.outer_allocator()); } { return outermost_allocator_imp<outer_type>::get(a.outer_allocator()); }
}; };
@@ -112,12 +112,12 @@ struct outermost_allocator
{}; {};
template <typename Allocator> template <typename Allocator>
typename outermost_allocator<Allocator>::type & BOOST_CONTAINER_FORCEINLINE typename outermost_allocator<Allocator>::type &
get_outermost_allocator(Allocator &a) get_outermost_allocator(Allocator &a)
{ return outermost_allocator<Allocator>::get(a); } { return outermost_allocator<Allocator>::get(a); }
template <typename Allocator> template <typename Allocator>
const typename outermost_allocator<Allocator>::type & BOOST_CONTAINER_FORCEINLINE const typename outermost_allocator<Allocator>::type &
get_outermost_allocator(const Allocator &a) get_outermost_allocator(const Allocator &a)
{ return outermost_allocator<Allocator>::get(a); } { return outermost_allocator<Allocator>::get(a); }
@@ -161,34 +161,34 @@ class scoped_allocator_adaptor_base
inner_allocator_type::is_always_equal::value inner_allocator_type::is_always_equal::value
> is_always_equal; > is_always_equal;
scoped_allocator_adaptor_base() BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base()
{} {}
template <class OuterA2> template <class OuterA2>
scoped_allocator_adaptor_base(BOOST_FWD_REF(OuterA2) outerAlloc, const InnerAllocs &...args) BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(BOOST_FWD_REF(OuterA2) outerAlloc, const InnerAllocs &...args)
: outer_allocator_type(::boost::forward<OuterA2>(outerAlloc)) : outer_allocator_type(::boost::forward<OuterA2>(outerAlloc))
, m_inner(args...) , m_inner(args...)
{} {}
scoped_allocator_adaptor_base(const scoped_allocator_adaptor_base& other) BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(const scoped_allocator_adaptor_base& other)
: outer_allocator_type(other.outer_allocator()) : outer_allocator_type(other.outer_allocator())
, m_inner(other.inner_allocator()) , m_inner(other.inner_allocator())
{} {}
scoped_allocator_adaptor_base(BOOST_RV_REF(scoped_allocator_adaptor_base) other) BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(BOOST_RV_REF(scoped_allocator_adaptor_base) other)
: outer_allocator_type(::boost::move(other.outer_allocator())) : outer_allocator_type(::boost::move(other.outer_allocator()))
, m_inner(::boost::move(other.inner_allocator())) , m_inner(::boost::move(other.inner_allocator()))
{} {}
template <class OuterA2> template <class OuterA2>
scoped_allocator_adaptor_base BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base
(const scoped_allocator_adaptor_base<OuterA2, InnerAllocs...>& other) (const scoped_allocator_adaptor_base<OuterA2, InnerAllocs...>& other)
: outer_allocator_type(other.outer_allocator()) : outer_allocator_type(other.outer_allocator())
, m_inner(other.inner_allocator()) , m_inner(other.inner_allocator())
{} {}
template <class OuterA2> template <class OuterA2>
scoped_allocator_adaptor_base BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base
(BOOST_RV_REF_BEG scoped_allocator_adaptor_base (BOOST_RV_REF_BEG scoped_allocator_adaptor_base
<OuterA2, InnerAllocs...> BOOST_RV_REF_END other) <OuterA2, InnerAllocs...> BOOST_RV_REF_END other)
: outer_allocator_type(other.outer_allocator()) : outer_allocator_type(other.outer_allocator())
@@ -199,7 +199,7 @@ class scoped_allocator_adaptor_base
struct internal_type_t{}; struct internal_type_t{};
template <class OuterA2> template <class OuterA2>
scoped_allocator_adaptor_base BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base
( internal_type_t ( internal_type_t
, BOOST_FWD_REF(OuterA2) outerAlloc , BOOST_FWD_REF(OuterA2) outerAlloc
, const inner_allocator_type &inner) , const inner_allocator_type &inner)
@@ -209,7 +209,7 @@ class scoped_allocator_adaptor_base
public: public:
scoped_allocator_adaptor_base &operator= BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base &operator=
(BOOST_COPY_ASSIGN_REF(scoped_allocator_adaptor_base) other) (BOOST_COPY_ASSIGN_REF(scoped_allocator_adaptor_base) other)
{ {
outer_allocator_type::operator=(other.outer_allocator()); outer_allocator_type::operator=(other.outer_allocator());
@@ -217,35 +217,35 @@ class scoped_allocator_adaptor_base
return *this; return *this;
} }
scoped_allocator_adaptor_base &operator=(BOOST_RV_REF(scoped_allocator_adaptor_base) other) BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base &operator=(BOOST_RV_REF(scoped_allocator_adaptor_base) other)
{ {
outer_allocator_type::operator=(boost::move(other.outer_allocator())); outer_allocator_type::operator=(boost::move(other.outer_allocator()));
m_inner = ::boost::move(other.inner_allocator()); m_inner = ::boost::move(other.inner_allocator());
return *this; return *this;
} }
void swap(scoped_allocator_adaptor_base &r) BOOST_CONTAINER_FORCEINLINE void swap(scoped_allocator_adaptor_base &r)
{ {
boost::adl_move_swap(this->outer_allocator(), r.outer_allocator()); boost::adl_move_swap(this->outer_allocator(), r.outer_allocator());
boost::adl_move_swap(this->m_inner, r.inner_allocator()); boost::adl_move_swap(this->m_inner, r.inner_allocator());
} }
friend void swap(scoped_allocator_adaptor_base &l, scoped_allocator_adaptor_base &r) BOOST_CONTAINER_FORCEINLINE friend void swap(scoped_allocator_adaptor_base &l, scoped_allocator_adaptor_base &r)
{ l.swap(r); } { l.swap(r); }
inner_allocator_type& inner_allocator() BOOST_NOEXCEPT_OR_NOTHROW BOOST_CONTAINER_FORCEINLINE inner_allocator_type& inner_allocator() BOOST_NOEXCEPT_OR_NOTHROW
{ return m_inner; } { return m_inner; }
inner_allocator_type const& inner_allocator() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_CONTAINER_FORCEINLINE inner_allocator_type const& inner_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
{ return m_inner; } { return m_inner; }
outer_allocator_type & outer_allocator() BOOST_NOEXCEPT_OR_NOTHROW BOOST_CONTAINER_FORCEINLINE outer_allocator_type & outer_allocator() BOOST_NOEXCEPT_OR_NOTHROW
{ return static_cast<outer_allocator_type&>(*this); } { return static_cast<outer_allocator_type&>(*this); }
const outer_allocator_type &outer_allocator() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_CONTAINER_FORCEINLINE const outer_allocator_type &outer_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
{ return static_cast<const outer_allocator_type&>(*this); } { return static_cast<const outer_allocator_type&>(*this); }
scoped_allocator_type select_on_container_copy_construction() const BOOST_CONTAINER_FORCEINLINE scoped_allocator_type select_on_container_copy_construction() const
{ {
return scoped_allocator_type return scoped_allocator_type
(internal_type_t() (internal_type_t()
@@ -304,33 +304,33 @@ class scoped_allocator_adaptor_base<OuterAlloc, true, BOOST_MOVE_TARG##N>\
inner_allocator_type::is_always_equal::value\ inner_allocator_type::is_always_equal::value\
> is_always_equal;\ > is_always_equal;\
\ \
scoped_allocator_adaptor_base(){}\ BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(){}\
\ \
template <class OuterA2>\ template <class OuterA2>\
scoped_allocator_adaptor_base(BOOST_FWD_REF(OuterA2) outerAlloc, BOOST_MOVE_CREF##N)\ BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(BOOST_FWD_REF(OuterA2) outerAlloc, BOOST_MOVE_CREF##N)\
: outer_allocator_type(::boost::forward<OuterA2>(outerAlloc))\ : outer_allocator_type(::boost::forward<OuterA2>(outerAlloc))\
, m_inner(BOOST_MOVE_ARG##N)\ , m_inner(BOOST_MOVE_ARG##N)\
{}\ {}\
\ \
scoped_allocator_adaptor_base(const scoped_allocator_adaptor_base& other)\ BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(const scoped_allocator_adaptor_base& other)\
: outer_allocator_type(other.outer_allocator())\ : outer_allocator_type(other.outer_allocator())\
, m_inner(other.inner_allocator())\ , m_inner(other.inner_allocator())\
{}\ {}\
\ \
scoped_allocator_adaptor_base(BOOST_RV_REF(scoped_allocator_adaptor_base) other)\ BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(BOOST_RV_REF(scoped_allocator_adaptor_base) other)\
: outer_allocator_type(::boost::move(other.outer_allocator()))\ : outer_allocator_type(::boost::move(other.outer_allocator()))\
, m_inner(::boost::move(other.inner_allocator()))\ , m_inner(::boost::move(other.inner_allocator()))\
{}\ {}\
\ \
template <class OuterA2>\ template <class OuterA2>\
scoped_allocator_adaptor_base\ BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base\
(const scoped_allocator_adaptor_base<OuterA2, true, BOOST_MOVE_TARG##N>& other)\ (const scoped_allocator_adaptor_base<OuterA2, true, BOOST_MOVE_TARG##N>& other)\
: outer_allocator_type(other.outer_allocator())\ : outer_allocator_type(other.outer_allocator())\
, m_inner(other.inner_allocator())\ , m_inner(other.inner_allocator())\
{}\ {}\
\ \
template <class OuterA2>\ template <class OuterA2>\
scoped_allocator_adaptor_base\ BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base\
(BOOST_RV_REF_BEG scoped_allocator_adaptor_base<OuterA2, true, BOOST_MOVE_TARG##N> BOOST_RV_REF_END other)\ (BOOST_RV_REF_BEG scoped_allocator_adaptor_base<OuterA2, true, BOOST_MOVE_TARG##N> BOOST_RV_REF_END other)\
: outer_allocator_type(other.outer_allocator())\ : outer_allocator_type(other.outer_allocator())\
, m_inner(other.inner_allocator())\ , m_inner(other.inner_allocator())\
@@ -340,14 +340,14 @@ class scoped_allocator_adaptor_base<OuterAlloc, true, BOOST_MOVE_TARG##N>\
struct internal_type_t{};\ struct internal_type_t{};\
\ \
template <class OuterA2>\ template <class OuterA2>\
scoped_allocator_adaptor_base\ BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base\
( internal_type_t, BOOST_FWD_REF(OuterA2) outerAlloc, const inner_allocator_type &inner)\ ( internal_type_t, BOOST_FWD_REF(OuterA2) outerAlloc, const inner_allocator_type &inner)\
: outer_allocator_type(::boost::forward<OuterA2>(outerAlloc))\ : outer_allocator_type(::boost::forward<OuterA2>(outerAlloc))\
, m_inner(inner)\ , m_inner(inner)\
{}\ {}\
\ \
public:\ public:\
scoped_allocator_adaptor_base &operator=\ BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base &operator=\
(BOOST_COPY_ASSIGN_REF(scoped_allocator_adaptor_base) other)\ (BOOST_COPY_ASSIGN_REF(scoped_allocator_adaptor_base) other)\
{\ {\
outer_allocator_type::operator=(other.outer_allocator());\ outer_allocator_type::operator=(other.outer_allocator());\
@@ -355,35 +355,35 @@ class scoped_allocator_adaptor_base<OuterAlloc, true, BOOST_MOVE_TARG##N>\
return *this;\ return *this;\
}\ }\
\ \
scoped_allocator_adaptor_base &operator=(BOOST_RV_REF(scoped_allocator_adaptor_base) other)\ BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base &operator=(BOOST_RV_REF(scoped_allocator_adaptor_base) other)\
{\ {\
outer_allocator_type::operator=(boost::move(other.outer_allocator()));\ outer_allocator_type::operator=(boost::move(other.outer_allocator()));\
m_inner = ::boost::move(other.inner_allocator());\ m_inner = ::boost::move(other.inner_allocator());\
return *this;\ return *this;\
}\ }\
\ \
void swap(scoped_allocator_adaptor_base &r)\ BOOST_CONTAINER_FORCEINLINE void swap(scoped_allocator_adaptor_base &r)\
{\ {\
boost::adl_move_swap(this->outer_allocator(), r.outer_allocator());\ boost::adl_move_swap(this->outer_allocator(), r.outer_allocator());\
boost::adl_move_swap(this->m_inner, r.inner_allocator());\ boost::adl_move_swap(this->m_inner, r.inner_allocator());\
}\ }\
\ \
friend void swap(scoped_allocator_adaptor_base &l, scoped_allocator_adaptor_base &r)\ BOOST_CONTAINER_FORCEINLINE friend void swap(scoped_allocator_adaptor_base &l, scoped_allocator_adaptor_base &r)\
{ l.swap(r); }\ { l.swap(r); }\
\ \
inner_allocator_type& inner_allocator()\ BOOST_CONTAINER_FORCEINLINE inner_allocator_type& inner_allocator()\
{ return m_inner; }\ { return m_inner; }\
\ \
inner_allocator_type const& inner_allocator() const\ BOOST_CONTAINER_FORCEINLINE inner_allocator_type const& inner_allocator() const\
{ return m_inner; }\ { return m_inner; }\
\ \
outer_allocator_type & outer_allocator()\ BOOST_CONTAINER_FORCEINLINE outer_allocator_type & outer_allocator()\
{ return static_cast<outer_allocator_type&>(*this); }\ { return static_cast<outer_allocator_type&>(*this); }\
\ \
const outer_allocator_type &outer_allocator() const\ BOOST_CONTAINER_FORCEINLINE const outer_allocator_type &outer_allocator() const\
{ return static_cast<const outer_allocator_type&>(*this); }\ { return static_cast<const outer_allocator_type&>(*this); }\
\ \
scoped_allocator_type select_on_container_copy_construction() const\ BOOST_CONTAINER_FORCEINLINE scoped_allocator_type select_on_container_copy_construction() const\
{\ {\
return scoped_allocator_type\ return scoped_allocator_type\
(internal_type_t()\ (internal_type_t()\
@@ -440,30 +440,30 @@ class scoped_allocator_adaptor_base< OuterAlloc BOOST_CONTAINER_SCOPEDALLOC_DUMM
typedef typename outer_traits_type:: typedef typename outer_traits_type::
is_always_equal is_always_equal; is_always_equal is_always_equal;
scoped_allocator_adaptor_base() BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base()
{} {}
template <class OuterA2> template <class OuterA2>
scoped_allocator_adaptor_base(BOOST_FWD_REF(OuterA2) outerAlloc) BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(BOOST_FWD_REF(OuterA2) outerAlloc)
: outer_allocator_type(::boost::forward<OuterA2>(outerAlloc)) : outer_allocator_type(::boost::forward<OuterA2>(outerAlloc))
{} {}
scoped_allocator_adaptor_base(const scoped_allocator_adaptor_base& other) BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(const scoped_allocator_adaptor_base& other)
: outer_allocator_type(other.outer_allocator()) : outer_allocator_type(other.outer_allocator())
{} {}
scoped_allocator_adaptor_base(BOOST_RV_REF(scoped_allocator_adaptor_base) other) BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(BOOST_RV_REF(scoped_allocator_adaptor_base) other)
: outer_allocator_type(::boost::move(other.outer_allocator())) : outer_allocator_type(::boost::move(other.outer_allocator()))
{} {}
template <class OuterA2> template <class OuterA2>
scoped_allocator_adaptor_base BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base
(const scoped_allocator_adaptor_base<OuterA2 BOOST_CONTAINER_SCOPEDALLOC_DUMMYTRUE>& other) (const scoped_allocator_adaptor_base<OuterA2 BOOST_CONTAINER_SCOPEDALLOC_DUMMYTRUE>& other)
: outer_allocator_type(other.outer_allocator()) : outer_allocator_type(other.outer_allocator())
{} {}
template <class OuterA2> template <class OuterA2>
scoped_allocator_adaptor_base BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base
(BOOST_RV_REF_BEG scoped_allocator_adaptor_base<OuterA2 BOOST_CONTAINER_SCOPEDALLOC_DUMMYTRUE> BOOST_RV_REF_END other) (BOOST_RV_REF_BEG scoped_allocator_adaptor_base<OuterA2 BOOST_CONTAINER_SCOPEDALLOC_DUMMYTRUE> BOOST_RV_REF_END other)
: outer_allocator_type(other.outer_allocator()) : outer_allocator_type(other.outer_allocator())
{} {}
@@ -472,44 +472,44 @@ class scoped_allocator_adaptor_base< OuterAlloc BOOST_CONTAINER_SCOPEDALLOC_DUMM
struct internal_type_t{}; struct internal_type_t{};
template <class OuterA2> template <class OuterA2>
scoped_allocator_adaptor_base(internal_type_t, BOOST_FWD_REF(OuterA2) outerAlloc, const inner_allocator_type &) BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(internal_type_t, BOOST_FWD_REF(OuterA2) outerAlloc, const inner_allocator_type &)
: outer_allocator_type(::boost::forward<OuterA2>(outerAlloc)) : outer_allocator_type(::boost::forward<OuterA2>(outerAlloc))
{} {}
public: public:
scoped_allocator_adaptor_base &operator=(BOOST_COPY_ASSIGN_REF(scoped_allocator_adaptor_base) other) BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base &operator=(BOOST_COPY_ASSIGN_REF(scoped_allocator_adaptor_base) other)
{ {
outer_allocator_type::operator=(other.outer_allocator()); outer_allocator_type::operator=(other.outer_allocator());
return *this; return *this;
} }
scoped_allocator_adaptor_base &operator=(BOOST_RV_REF(scoped_allocator_adaptor_base) other) BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base &operator=(BOOST_RV_REF(scoped_allocator_adaptor_base) other)
{ {
outer_allocator_type::operator=(boost::move(other.outer_allocator())); outer_allocator_type::operator=(boost::move(other.outer_allocator()));
return *this; return *this;
} }
void swap(scoped_allocator_adaptor_base &r) BOOST_CONTAINER_FORCEINLINE void swap(scoped_allocator_adaptor_base &r)
{ {
boost::adl_move_swap(this->outer_allocator(), r.outer_allocator()); boost::adl_move_swap(this->outer_allocator(), r.outer_allocator());
} }
friend void swap(scoped_allocator_adaptor_base &l, scoped_allocator_adaptor_base &r) BOOST_CONTAINER_FORCEINLINE friend void swap(scoped_allocator_adaptor_base &l, scoped_allocator_adaptor_base &r)
{ l.swap(r); } { l.swap(r); }
inner_allocator_type& inner_allocator() BOOST_CONTAINER_FORCEINLINE inner_allocator_type& inner_allocator()
{ return static_cast<inner_allocator_type&>(*this); } { return static_cast<inner_allocator_type&>(*this); }
inner_allocator_type const& inner_allocator() const BOOST_CONTAINER_FORCEINLINE inner_allocator_type const& inner_allocator() const
{ return static_cast<const inner_allocator_type&>(*this); } { return static_cast<const inner_allocator_type&>(*this); }
outer_allocator_type & outer_allocator() BOOST_CONTAINER_FORCEINLINE outer_allocator_type & outer_allocator()
{ return static_cast<outer_allocator_type&>(*this); } { return static_cast<outer_allocator_type&>(*this); }
const outer_allocator_type &outer_allocator() const BOOST_CONTAINER_FORCEINLINE const outer_allocator_type &outer_allocator() const
{ return static_cast<const outer_allocator_type&>(*this); } { return static_cast<const outer_allocator_type&>(*this); }
scoped_allocator_type select_on_container_copy_construction() const BOOST_CONTAINER_FORCEINLINE scoped_allocator_type select_on_container_copy_construction() const
{ {
return scoped_allocator_type return scoped_allocator_type
(internal_type_t() (internal_type_t()
@@ -641,21 +641,21 @@ class scoped_allocator_adaptor
//! <b>Effects</b>: value-initializes the OuterAlloc base class //! <b>Effects</b>: value-initializes the OuterAlloc base class
//! and the inner allocator object. //! and the inner allocator object.
scoped_allocator_adaptor() BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor()
{} {}
~scoped_allocator_adaptor() BOOST_CONTAINER_FORCEINLINE ~scoped_allocator_adaptor()
{} {}
//! <b>Effects</b>: initializes each allocator within the adaptor with //! <b>Effects</b>: initializes each allocator within the adaptor with
//! the corresponding allocator from other. //! the corresponding allocator from other.
scoped_allocator_adaptor(const scoped_allocator_adaptor& other) BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor(const scoped_allocator_adaptor& other)
: base_type(other.base()) : base_type(other.base())
{} {}
//! <b>Effects</b>: move constructs each allocator within the adaptor with //! <b>Effects</b>: move constructs each allocator within the adaptor with
//! the corresponding allocator from other. //! the corresponding allocator from other.
scoped_allocator_adaptor(BOOST_RV_REF(scoped_allocator_adaptor) other) BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor(BOOST_RV_REF(scoped_allocator_adaptor) other)
: base_type(::boost::move(other.base())) : base_type(::boost::move(other.base()))
{} {}
@@ -667,14 +667,14 @@ class scoped_allocator_adaptor
//! with innerAllocs...(hence recursively initializing each allocator within the adaptor with the //! with innerAllocs...(hence recursively initializing each allocator within the adaptor with the
//! corresponding allocator from the argument list). //! corresponding allocator from the argument list).
template <class OuterA2> template <class OuterA2>
scoped_allocator_adaptor(BOOST_FWD_REF(OuterA2) outerAlloc, const InnerAllocs & ...innerAllocs) BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor(BOOST_FWD_REF(OuterA2) outerAlloc, const InnerAllocs & ...innerAllocs)
: base_type(::boost::forward<OuterA2>(outerAlloc), innerAllocs...) : base_type(::boost::forward<OuterA2>(outerAlloc), innerAllocs...)
{} {}
#else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
#define BOOST_CONTAINER_SCOPED_ALLOCATOR_ADAPTOR_RELATED_ALLOCATOR_CONSTRUCTOR_CODE(N)\ #define BOOST_CONTAINER_SCOPED_ALLOCATOR_ADAPTOR_RELATED_ALLOCATOR_CONSTRUCTOR_CODE(N)\
template <class OuterA2>\ template <class OuterA2>\
scoped_allocator_adaptor(BOOST_FWD_REF(OuterA2) outerAlloc BOOST_MOVE_I##N BOOST_MOVE_CREF##N)\ BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor(BOOST_FWD_REF(OuterA2) outerAlloc BOOST_MOVE_I##N BOOST_MOVE_CREF##N)\
: base_type(::boost::forward<OuterA2>(outerAlloc) BOOST_MOVE_I##N BOOST_MOVE_ARG##N)\ : base_type(::boost::forward<OuterA2>(outerAlloc) BOOST_MOVE_I##N BOOST_MOVE_ARG##N)\
{}\ {}\
// //
@@ -687,7 +687,7 @@ class scoped_allocator_adaptor
//! //!
//! <b>Effects</b>: initializes each allocator within the adaptor with the corresponding allocator from other. //! <b>Effects</b>: initializes each allocator within the adaptor with the corresponding allocator from other.
template <class OuterA2> template <class OuterA2>
scoped_allocator_adaptor(const scoped_allocator_adaptor<OuterA2, BOOST_CONTAINER_SCOPEDALLOC_ALLINNER> &other) BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor(const scoped_allocator_adaptor<OuterA2, BOOST_CONTAINER_SCOPEDALLOC_ALLINNER> &other)
: base_type(other.base()) : base_type(other.base())
{} {}
@@ -696,15 +696,15 @@ class scoped_allocator_adaptor
//! <b>Effects</b>: initializes each allocator within the adaptor with the corresponding allocator //! <b>Effects</b>: initializes each allocator within the adaptor with the corresponding allocator
//! rvalue from other. //! rvalue from other.
template <class OuterA2> template <class OuterA2>
scoped_allocator_adaptor(BOOST_RV_REF_BEG scoped_allocator_adaptor BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor(BOOST_RV_REF_BEG scoped_allocator_adaptor
<OuterA2, BOOST_CONTAINER_SCOPEDALLOC_ALLINNER> BOOST_RV_REF_END other) <OuterA2, BOOST_CONTAINER_SCOPEDALLOC_ALLINNER> BOOST_RV_REF_END other)
: base_type(::boost::move(other.base())) : base_type(::boost::move(other.base()))
{} {}
scoped_allocator_adaptor &operator=(BOOST_COPY_ASSIGN_REF(scoped_allocator_adaptor) other) BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor &operator=(BOOST_COPY_ASSIGN_REF(scoped_allocator_adaptor) other)
{ return static_cast<scoped_allocator_adaptor&>(base_type::operator=(static_cast<const base_type &>(other))); } { return static_cast<scoped_allocator_adaptor&>(base_type::operator=(static_cast<const base_type &>(other))); }
scoped_allocator_adaptor &operator=(BOOST_RV_REF(scoped_allocator_adaptor) other) BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor &operator=(BOOST_RV_REF(scoped_allocator_adaptor) other)
{ return static_cast<scoped_allocator_adaptor&>(base_type::operator=(boost::move(other.base()))); } { return static_cast<scoped_allocator_adaptor&>(base_type::operator=(boost::move(other.base()))); }
#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED #ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
@@ -736,13 +736,13 @@ class scoped_allocator_adaptor
//! <b>Returns</b>: //! <b>Returns</b>:
//! <code>allocator_traits<OuterAlloc>:: max_size(outer_allocator())</code>. //! <code>allocator_traits<OuterAlloc>:: max_size(outer_allocator())</code>.
size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_CONTAINER_FORCEINLINE size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
{ return outer_traits_type::max_size(this->outer_allocator()); } { return outer_traits_type::max_size(this->outer_allocator()); }
//! <b>Effects</b>: //! <b>Effects</b>:
//! calls <code>OUTERMOST_ALLOC_TRAITS(*this):: destroy(OUTERMOST(*this), p)</code>. //! calls <code>OUTERMOST_ALLOC_TRAITS(*this):: destroy(OUTERMOST(*this), p)</code>.
template <class T> template <class T>
void destroy(T* p) BOOST_NOEXCEPT_OR_NOTHROW BOOST_CONTAINER_FORCEINLINE void destroy(T* p) BOOST_NOEXCEPT_OR_NOTHROW
{ {
allocator_traits<typename outermost_allocator<OuterAlloc>::type> allocator_traits<typename outermost_allocator<OuterAlloc>::type>
::destroy(get_outermost_allocator(this->outer_allocator()), p); ::destroy(get_outermost_allocator(this->outer_allocator()), p);
@@ -750,17 +750,17 @@ class scoped_allocator_adaptor
//! <b>Returns</b>: //! <b>Returns</b>:
//! <code>allocator_traits<OuterAlloc>::allocate(outer_allocator(), n)</code>. //! <code>allocator_traits<OuterAlloc>::allocate(outer_allocator(), n)</code>.
pointer allocate(size_type n) BOOST_CONTAINER_FORCEINLINE pointer allocate(size_type n)
{ return outer_traits_type::allocate(this->outer_allocator(), n); } { return outer_traits_type::allocate(this->outer_allocator(), n); }
//! <b>Returns</b>: //! <b>Returns</b>:
//! <code>allocator_traits<OuterAlloc>::allocate(outer_allocator(), n, hint)</code>. //! <code>allocator_traits<OuterAlloc>::allocate(outer_allocator(), n, hint)</code>.
pointer allocate(size_type n, const_void_pointer hint) BOOST_CONTAINER_FORCEINLINE pointer allocate(size_type n, const_void_pointer hint)
{ return outer_traits_type::allocate(this->outer_allocator(), n, hint); } { return outer_traits_type::allocate(this->outer_allocator(), n, hint); }
//! <b>Effects</b>: //! <b>Effects</b>:
//! <code>allocator_traits<OuterAlloc>::deallocate(outer_allocator(), p, n)</code>. //! <code>allocator_traits<OuterAlloc>::deallocate(outer_allocator(), p, n)</code>.
void deallocate(pointer p, size_type n) BOOST_CONTAINER_FORCEINLINE void deallocate(pointer p, size_type n)
{ outer_traits_type::deallocate(this->outer_allocator(), p, n); } { outer_traits_type::deallocate(this->outer_allocator(), p, n); }
#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED #ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
@@ -772,9 +772,9 @@ class scoped_allocator_adaptor
#endif //BOOST_CONTAINER_DOXYGEN_INVOKED #endif //BOOST_CONTAINER_DOXYGEN_INVOKED
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
base_type &base() { return *this; } BOOST_CONTAINER_FORCEINLINE base_type &base() { return *this; }
const base_type &base() const { return *this; } BOOST_CONTAINER_FORCEINLINE const base_type &base() const { return *this; }
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
@@ -808,7 +808,7 @@ class scoped_allocator_adaptor
//! to true but the specific constructor does not take an allocator. This definition prevents a silent //! to true but the specific constructor does not take an allocator. This definition prevents a silent
//! failure to pass an inner allocator to a contained element. -end note] //! failure to pass an inner allocator to a contained element. -end note]
template < typename T, class ...Args> template < typename T, class ...Args>
void construct(T* p, BOOST_FWD_REF(Args)...args) BOOST_CONTAINER_FORCEINLINE void construct(T* p, BOOST_FWD_REF(Args)...args)
{ {
dtl::dispatch_uses_allocator dtl::dispatch_uses_allocator
( (get_outermost_allocator)(this->outer_allocator()) ( (get_outermost_allocator)(this->outer_allocator())
@@ -821,7 +821,7 @@ class scoped_allocator_adaptor
//overload selection problems when the first parameter is a pair. //overload selection problems when the first parameter is a pair.
#define BOOST_CONTAINER_SCOPED_ALLOCATOR_CONSTRUCT_CODE(N) \ #define BOOST_CONTAINER_SCOPED_ALLOCATOR_CONSTRUCT_CODE(N) \
template < typename T BOOST_MOVE_I##N BOOST_MOVE_CLASSQ##N >\ template < typename T BOOST_MOVE_I##N BOOST_MOVE_CLASSQ##N >\
void construct(T* p BOOST_MOVE_I##N BOOST_MOVE_UREFQ##N)\ BOOST_CONTAINER_FORCEINLINE void construct(T* p BOOST_MOVE_I##N BOOST_MOVE_UREFQ##N)\
{\ {\
dtl::dispatch_uses_allocator\ dtl::dispatch_uses_allocator\
( (get_outermost_allocator)(this->outer_allocator())\ ( (get_outermost_allocator)(this->outer_allocator())\
@@ -838,7 +838,7 @@ class scoped_allocator_adaptor
public: public:
//Internal function //Internal function
template <class OuterA2> template <class OuterA2>
scoped_allocator_adaptor(internal_type_t, BOOST_FWD_REF(OuterA2) outer, const inner_allocator_type& inner) BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor(internal_type_t, BOOST_FWD_REF(OuterA2) outer, const inner_allocator_type& inner)
: base_type(internal_type_t(), ::boost::forward<OuterA2>(outer), inner) : base_type(internal_type_t(), ::boost::forward<OuterA2>(outer), inner)
{} {}
@@ -853,17 +853,17 @@ struct scoped_allocator_operator_equal
//Optimize equal outer allocator types with //Optimize equal outer allocator types with
//allocator_traits::equal which uses is_always_equal //allocator_traits::equal which uses is_always_equal
template<class IA> template<class IA>
static bool equal_outer(const IA &l, const IA &r) BOOST_CONTAINER_FORCEINLINE static bool equal_outer(const IA &l, const IA &r)
{ return allocator_traits<IA>::equal(l, r); } { return allocator_traits<IA>::equal(l, r); }
//Otherwise compare it normally //Otherwise compare it normally
template<class IA1, class IA2> template<class IA1, class IA2>
static bool equal_outer(const IA1 &l, const IA2 &r) BOOST_CONTAINER_FORCEINLINE static bool equal_outer(const IA1 &l, const IA2 &r)
{ return l == r; } { return l == r; }
//Otherwise compare it normally //Otherwise compare it normally
template<class IA> template<class IA>
static bool equal_inner(const IA &l, const IA &r) BOOST_CONTAINER_FORCEINLINE static bool equal_inner(const IA &l, const IA &r)
{ return allocator_traits<IA>::equal(l, r); } { return allocator_traits<IA>::equal(l, r); }
}; };
@@ -875,14 +875,14 @@ struct scoped_allocator_operator_equal<true>
//inner_allocator_type is the same as outer_allocator_type //inner_allocator_type is the same as outer_allocator_type
//so both types can be different in operator== //so both types can be different in operator==
template<class IA1, class IA2> template<class IA1, class IA2>
static bool equal_inner(const IA1 &, const IA2 &) BOOST_CONTAINER_FORCEINLINE static bool equal_inner(const IA1 &, const IA2 &)
{ return true; } { return true; }
}; };
/// @endcond /// @endcond
template <typename OuterA1, typename OuterA2, BOOST_CONTAINER_SCOPEDALLOC_ALLINNERCLASS> template <typename OuterA1, typename OuterA2, BOOST_CONTAINER_SCOPEDALLOC_ALLINNERCLASS>
inline bool operator==(const scoped_allocator_adaptor<OuterA1, BOOST_CONTAINER_SCOPEDALLOC_ALLINNER>& a BOOST_CONTAINER_FORCEINLINE bool operator==(const scoped_allocator_adaptor<OuterA1, BOOST_CONTAINER_SCOPEDALLOC_ALLINNER>& a
,const scoped_allocator_adaptor<OuterA2, BOOST_CONTAINER_SCOPEDALLOC_ALLINNER>& b) ,const scoped_allocator_adaptor<OuterA2, BOOST_CONTAINER_SCOPEDALLOC_ALLINNER>& b)
{ {
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
@@ -896,7 +896,7 @@ inline bool operator==(const scoped_allocator_adaptor<OuterA1, BOOST_CONTAINER_S
} }
template <typename OuterA1, typename OuterA2, BOOST_CONTAINER_SCOPEDALLOC_ALLINNERCLASS> template <typename OuterA1, typename OuterA2, BOOST_CONTAINER_SCOPEDALLOC_ALLINNERCLASS>
inline bool operator!=(const scoped_allocator_adaptor<OuterA1, BOOST_CONTAINER_SCOPEDALLOC_ALLINNER>& a BOOST_CONTAINER_FORCEINLINE bool operator!=(const scoped_allocator_adaptor<OuterA1, BOOST_CONTAINER_SCOPEDALLOC_ALLINNER>& a
,const scoped_allocator_adaptor<OuterA2, BOOST_CONTAINER_SCOPEDALLOC_ALLINNER>& b) ,const scoped_allocator_adaptor<OuterA2, BOOST_CONTAINER_SCOPEDALLOC_ALLINNER>& b)
{ return !(a == b); } { return !(a == b); }

View File

@@ -288,7 +288,7 @@ struct vector_alloc_holder
typedef typename allocator_traits_type::size_type size_type; typedef typename allocator_traits_type::size_type size_type;
typedef typename allocator_traits_type::value_type value_type; typedef typename allocator_traits_type::value_type value_type;
static bool is_propagable_from(const allocator_type &from_alloc, pointer p, const allocator_type &to_alloc, bool const propagate_allocator) BOOST_CONTAINER_FORCEINLINE static bool is_propagable_from(const allocator_type &from_alloc, pointer p, const allocator_type &to_alloc, bool const propagate_allocator)
{ {
(void)propagate_allocator; (void)p; (void)to_alloc; (void)from_alloc; (void)propagate_allocator; (void)p; (void)to_alloc; (void)from_alloc;
const bool all_storage_propagable = !allocator_traits_type::is_partially_propagable::value || const bool all_storage_propagable = !allocator_traits_type::is_partially_propagable::value ||
@@ -296,7 +296,7 @@ struct vector_alloc_holder
return all_storage_propagable && (propagate_allocator || allocator_traits_type::equal(from_alloc, to_alloc)); return all_storage_propagable && (propagate_allocator || allocator_traits_type::equal(from_alloc, to_alloc));
} }
static bool are_swap_propagable(const allocator_type &l_a, pointer l_p, const allocator_type &r_a, pointer r_p, bool const propagate_allocator) BOOST_CONTAINER_FORCEINLINE static bool are_swap_propagable(const allocator_type &l_a, pointer l_p, const allocator_type &r_a, pointer r_p, bool const propagate_allocator)
{ {
(void)propagate_allocator; (void)l_p; (void)r_p; (void)l_a; (void)r_a; (void)propagate_allocator; (void)l_p; (void)r_p; (void)l_a; (void)r_a;
const bool all_storage_propagable = !allocator_traits_type::is_partially_propagable::value || const bool all_storage_propagable = !allocator_traits_type::is_partially_propagable::value ||