forked from boostorg/container
@@ -664,6 +664,12 @@ class scoped_allocator_adaptor_base
|
||||
return *this;
|
||||
}
|
||||
|
||||
void swap(scoped_allocator_adaptor_base &r)
|
||||
{
|
||||
boost::container::swap_dispatch(this->outer_allocator(), r.outer_allocator());
|
||||
boost::container::swap_dispatch(this->m_inner, r.inner_allocator());
|
||||
}
|
||||
|
||||
inner_allocator_type& inner_allocator()
|
||||
{ return m_inner; }
|
||||
|
||||
@@ -812,6 +818,12 @@ class scoped_allocator_adaptor_base<OuterAlloc, true
|
||||
return *this; \
|
||||
} \
|
||||
\
|
||||
void swap(scoped_allocator_adaptor_base &r) \
|
||||
{ \
|
||||
boost::container::swap_dispatch(this->outer_allocator(), r.outer_allocator()); \
|
||||
boost::container::swap_dispatch(this->m_inner, r.inner_allocator()); \
|
||||
} \
|
||||
\
|
||||
inner_allocator_type& inner_allocator() \
|
||||
{ return m_inner; } \
|
||||
\
|
||||
@@ -931,6 +943,11 @@ class scoped_allocator_adaptor_base
|
||||
return *this;
|
||||
}
|
||||
|
||||
void swap(scoped_allocator_adaptor_base &r)
|
||||
{
|
||||
boost::container::swap_dispatch(this->outer_allocator(), r.outer_allocator());
|
||||
}
|
||||
|
||||
inner_allocator_type& inner_allocator()
|
||||
{ return static_cast<inner_allocator_type&>(*this); }
|
||||
|
||||
@@ -1158,6 +1175,18 @@ class scoped_allocator_adaptor
|
||||
return *this;
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: swaps *this with r.
|
||||
//!
|
||||
void swap(scoped_allocator_adaptor &r)
|
||||
{
|
||||
base_type::swap(r);
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: swaps *this with r.
|
||||
//!
|
||||
friend void swap(scoped_allocator_adaptor &l, scoped_allocator_adaptor &r)
|
||||
{ l.swap(r); }
|
||||
|
||||
//! <b>Returns</b>:
|
||||
//! `static_cast<OuterAlloc&>(*this)`.
|
||||
outer_allocator_type & outer_allocator()
|
||||
|
||||
Reference in New Issue
Block a user