forked from boostorg/container
Don't use BOOST_CONTAINER_FORCEINLINE extensively, due to potential code bloat
This commit is contained in:
1 parent
9c852071f9
commit
1a4a205ea6
32 files changed
+1966
-2001
No files matched your search
@@ -77,10 +77,10 @@ struct outermost_allocator_imp
|
||||
{
|
||||
typedef MaybeScopedAlloc type;
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE static type &get(MaybeScopedAlloc &a)
|
||||
inline static type &get(MaybeScopedAlloc &a)
|
||||
{ return a; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE static const type &get(const MaybeScopedAlloc &a)
|
||||
inline static const type &get(const MaybeScopedAlloc &a)
|
||||
{ return a; }
|
||||
};
|
||||
|
||||
@@ -90,10 +90,10 @@ struct outermost_allocator_imp<MaybeScopedAlloc, true>
|
||||
typedef typename MaybeScopedAlloc::outer_allocator_type outer_type;
|
||||
typedef typename outermost_allocator_type_impl<outer_type>::type type;
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE static type &get(MaybeScopedAlloc &a)
|
||||
inline static type &get(MaybeScopedAlloc &a)
|
||||
{ return outermost_allocator_imp<outer_type>::get(a.outer_allocator()); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE static const type &get(const MaybeScopedAlloc &a)
|
||||
inline static const type &get(const MaybeScopedAlloc &a)
|
||||
{ return outermost_allocator_imp<outer_type>::get(a.outer_allocator()); }
|
||||
};
|
||||
|
||||
@@ -110,12 +110,12 @@ struct outermost_allocator
|
||||
{};
|
||||
|
||||
template <typename Allocator>
|
||||
BOOST_CONTAINER_FORCEINLINE typename outermost_allocator<Allocator>::type &
|
||||
inline typename outermost_allocator<Allocator>::type &
|
||||
get_outermost_allocator(Allocator &a)
|
||||
{ return outermost_allocator<Allocator>::get(a); }
|
||||
|
||||
template <typename Allocator>
|
||||
BOOST_CONTAINER_FORCEINLINE const typename outermost_allocator<Allocator>::type &
|
||||
inline const typename outermost_allocator<Allocator>::type &
|
||||
get_outermost_allocator(const Allocator &a)
|
||||
{ return outermost_allocator<Allocator>::get(a); }
|
||||
|
||||
@@ -159,34 +159,34 @@ class scoped_allocator_adaptor_base
|
||||
inner_allocator_type::is_always_equal::value
|
||||
> is_always_equal;
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base()
|
||||
inline scoped_allocator_adaptor_base()
|
||||
{}
|
||||
|
||||
template <class OuterA2>
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(BOOST_FWD_REF(OuterA2) outerAlloc, const InnerAllocs &...args)
|
||||
inline scoped_allocator_adaptor_base(BOOST_FWD_REF(OuterA2) outerAlloc, const InnerAllocs &...args)
|
||||
: outer_allocator_type(::boost::forward<OuterA2>(outerAlloc))
|
||||
, m_inner(args...)
|
||||
{}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(const scoped_allocator_adaptor_base& other)
|
||||
inline scoped_allocator_adaptor_base(const scoped_allocator_adaptor_base& other)
|
||||
: outer_allocator_type(other.outer_allocator())
|
||||
, m_inner(other.inner_allocator())
|
||||
{}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(BOOST_RV_REF(scoped_allocator_adaptor_base) other)
|
||||
inline scoped_allocator_adaptor_base(BOOST_RV_REF(scoped_allocator_adaptor_base) other)
|
||||
: outer_allocator_type(::boost::move(other.outer_allocator()))
|
||||
, m_inner(::boost::move(other.inner_allocator()))
|
||||
{}
|
||||
|
||||
template <class OuterA2>
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base
|
||||
inline scoped_allocator_adaptor_base
|
||||
(const scoped_allocator_adaptor_base<OuterA2, InnerAllocs...>& other)
|
||||
: outer_allocator_type(other.outer_allocator())
|
||||
, m_inner(other.inner_allocator())
|
||||
{}
|
||||
|
||||
template <class OuterA2>
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base
|
||||
inline scoped_allocator_adaptor_base
|
||||
(BOOST_RV_REF_BEG scoped_allocator_adaptor_base
|
||||
<OuterA2, InnerAllocs...> BOOST_RV_REF_END other)
|
||||
: outer_allocator_type(other.outer_allocator())
|
||||
@@ -197,7 +197,7 @@ class scoped_allocator_adaptor_base
|
||||
struct internal_type_t{};
|
||||
|
||||
template <class OuterA2>
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base
|
||||
inline scoped_allocator_adaptor_base
|
||||
( internal_type_t
|
||||
, BOOST_FWD_REF(OuterA2) outerAlloc
|
||||
, const inner_allocator_type &inner)
|
||||
@@ -207,7 +207,7 @@ class scoped_allocator_adaptor_base
|
||||
|
||||
public:
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base &operator=
|
||||
inline scoped_allocator_adaptor_base &operator=
|
||||
(BOOST_COPY_ASSIGN_REF(scoped_allocator_adaptor_base) other)
|
||||
{
|
||||
outer_allocator_type::operator=(other.outer_allocator());
|
||||
@@ -215,35 +215,35 @@ class scoped_allocator_adaptor_base
|
||||
return *this;
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base &operator=(BOOST_RV_REF(scoped_allocator_adaptor_base) other)
|
||||
inline scoped_allocator_adaptor_base &operator=(BOOST_RV_REF(scoped_allocator_adaptor_base) other)
|
||||
{
|
||||
outer_allocator_type::operator=(boost::move(other.outer_allocator()));
|
||||
m_inner = ::boost::move(other.inner_allocator());
|
||||
return *this;
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE void swap(scoped_allocator_adaptor_base &r)
|
||||
inline void swap(scoped_allocator_adaptor_base &r)
|
||||
{
|
||||
boost::adl_move_swap(this->outer_allocator(), r.outer_allocator());
|
||||
boost::adl_move_swap(this->m_inner, r.inner_allocator());
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend void swap(scoped_allocator_adaptor_base &l, scoped_allocator_adaptor_base &r)
|
||||
inline friend void swap(scoped_allocator_adaptor_base &l, scoped_allocator_adaptor_base &r)
|
||||
{ l.swap(r); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE inner_allocator_type& inner_allocator() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
inline inner_allocator_type& inner_allocator() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return m_inner; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE inner_allocator_type const& inner_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
inline inner_allocator_type const& inner_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return m_inner; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE outer_allocator_type & outer_allocator() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
inline outer_allocator_type & outer_allocator() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return static_cast<outer_allocator_type&>(*this); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE const outer_allocator_type &outer_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
inline const outer_allocator_type &outer_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return static_cast<const outer_allocator_type&>(*this); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_type select_on_container_copy_construction() const
|
||||
inline scoped_allocator_type select_on_container_copy_construction() const
|
||||
{
|
||||
return scoped_allocator_type
|
||||
(internal_type_t()
|
||||
@@ -302,33 +302,33 @@ class scoped_allocator_adaptor_base<OuterAlloc, true, BOOST_MOVE_TARG##N>\
|
||||
inner_allocator_type::is_always_equal::value\
|
||||
> is_always_equal;\
|
||||
\
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(){}\
|
||||
inline scoped_allocator_adaptor_base(){}\
|
||||
\
|
||||
template <class OuterA2>\
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(BOOST_FWD_REF(OuterA2) outerAlloc, BOOST_MOVE_CREF##N)\
|
||||
inline scoped_allocator_adaptor_base(BOOST_FWD_REF(OuterA2) outerAlloc, BOOST_MOVE_CREF##N)\
|
||||
: outer_allocator_type(::boost::forward<OuterA2>(outerAlloc))\
|
||||
, m_inner(BOOST_MOVE_ARG##N)\
|
||||
{}\
|
||||
\
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(const scoped_allocator_adaptor_base& other)\
|
||||
inline scoped_allocator_adaptor_base(const scoped_allocator_adaptor_base& other)\
|
||||
: outer_allocator_type(other.outer_allocator())\
|
||||
, m_inner(other.inner_allocator())\
|
||||
{}\
|
||||
\
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(BOOST_RV_REF(scoped_allocator_adaptor_base) other)\
|
||||
inline scoped_allocator_adaptor_base(BOOST_RV_REF(scoped_allocator_adaptor_base) other)\
|
||||
: outer_allocator_type(::boost::move(other.outer_allocator()))\
|
||||
, m_inner(::boost::move(other.inner_allocator()))\
|
||||
{}\
|
||||
\
|
||||
template <class OuterA2>\
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base\
|
||||
inline scoped_allocator_adaptor_base\
|
||||
(const scoped_allocator_adaptor_base<OuterA2, true, BOOST_MOVE_TARG##N>& other)\
|
||||
: outer_allocator_type(other.outer_allocator())\
|
||||
, m_inner(other.inner_allocator())\
|
||||
{}\
|
||||
\
|
||||
template <class OuterA2>\
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base\
|
||||
inline scoped_allocator_adaptor_base\
|
||||
(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())\
|
||||
, m_inner(other.inner_allocator())\
|
||||
@@ -338,14 +338,14 @@ class scoped_allocator_adaptor_base<OuterAlloc, true, BOOST_MOVE_TARG##N>\
|
||||
struct internal_type_t{};\
|
||||
\
|
||||
template <class OuterA2>\
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base\
|
||||
inline scoped_allocator_adaptor_base\
|
||||
( internal_type_t, BOOST_FWD_REF(OuterA2) outerAlloc, const inner_allocator_type &inner)\
|
||||
: outer_allocator_type(::boost::forward<OuterA2>(outerAlloc))\
|
||||
, m_inner(inner)\
|
||||
{}\
|
||||
\
|
||||
public:\
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base &operator=\
|
||||
inline scoped_allocator_adaptor_base &operator=\
|
||||
(BOOST_COPY_ASSIGN_REF(scoped_allocator_adaptor_base) other)\
|
||||
{\
|
||||
outer_allocator_type::operator=(other.outer_allocator());\
|
||||
@@ -353,35 +353,35 @@ class scoped_allocator_adaptor_base<OuterAlloc, true, BOOST_MOVE_TARG##N>\
|
||||
return *this;\
|
||||
}\
|
||||
\
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base &operator=(BOOST_RV_REF(scoped_allocator_adaptor_base) other)\
|
||||
inline scoped_allocator_adaptor_base &operator=(BOOST_RV_REF(scoped_allocator_adaptor_base) other)\
|
||||
{\
|
||||
outer_allocator_type::operator=(boost::move(other.outer_allocator()));\
|
||||
m_inner = ::boost::move(other.inner_allocator());\
|
||||
return *this;\
|
||||
}\
|
||||
\
|
||||
BOOST_CONTAINER_FORCEINLINE void swap(scoped_allocator_adaptor_base &r)\
|
||||
inline void swap(scoped_allocator_adaptor_base &r)\
|
||||
{\
|
||||
boost::adl_move_swap(this->outer_allocator(), r.outer_allocator());\
|
||||
boost::adl_move_swap(this->m_inner, r.inner_allocator());\
|
||||
}\
|
||||
\
|
||||
BOOST_CONTAINER_FORCEINLINE friend void swap(scoped_allocator_adaptor_base &l, scoped_allocator_adaptor_base &r)\
|
||||
inline friend void swap(scoped_allocator_adaptor_base &l, scoped_allocator_adaptor_base &r)\
|
||||
{ l.swap(r); }\
|
||||
\
|
||||
BOOST_CONTAINER_FORCEINLINE inner_allocator_type& inner_allocator()\
|
||||
inline inner_allocator_type& inner_allocator()\
|
||||
{ return m_inner; }\
|
||||
\
|
||||
BOOST_CONTAINER_FORCEINLINE inner_allocator_type const& inner_allocator() const\
|
||||
inline inner_allocator_type const& inner_allocator() const\
|
||||
{ return m_inner; }\
|
||||
\
|
||||
BOOST_CONTAINER_FORCEINLINE outer_allocator_type & outer_allocator()\
|
||||
inline outer_allocator_type & outer_allocator()\
|
||||
{ return static_cast<outer_allocator_type&>(*this); }\
|
||||
\
|
||||
BOOST_CONTAINER_FORCEINLINE const outer_allocator_type &outer_allocator() const\
|
||||
inline const outer_allocator_type &outer_allocator() const\
|
||||
{ return static_cast<const outer_allocator_type&>(*this); }\
|
||||
\
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_type select_on_container_copy_construction() const\
|
||||
inline scoped_allocator_type select_on_container_copy_construction() const\
|
||||
{\
|
||||
return scoped_allocator_type\
|
||||
(internal_type_t()\
|
||||
@@ -438,30 +438,30 @@ class scoped_allocator_adaptor_base< OuterAlloc BOOST_CONTAINER_SCOPEDALLOC_DUMM
|
||||
typedef typename outer_traits_type::
|
||||
is_always_equal is_always_equal;
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base()
|
||||
inline scoped_allocator_adaptor_base()
|
||||
{}
|
||||
|
||||
template <class OuterA2>
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(BOOST_FWD_REF(OuterA2) outerAlloc)
|
||||
inline scoped_allocator_adaptor_base(BOOST_FWD_REF(OuterA2) outerAlloc)
|
||||
: outer_allocator_type(::boost::forward<OuterA2>(outerAlloc))
|
||||
{}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(const scoped_allocator_adaptor_base& other)
|
||||
inline scoped_allocator_adaptor_base(const scoped_allocator_adaptor_base& other)
|
||||
: outer_allocator_type(other.outer_allocator())
|
||||
{}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(BOOST_RV_REF(scoped_allocator_adaptor_base) other)
|
||||
inline scoped_allocator_adaptor_base(BOOST_RV_REF(scoped_allocator_adaptor_base) other)
|
||||
: outer_allocator_type(::boost::move(other.outer_allocator()))
|
||||
{}
|
||||
|
||||
template <class OuterA2>
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base
|
||||
inline scoped_allocator_adaptor_base
|
||||
(const scoped_allocator_adaptor_base<OuterA2 BOOST_CONTAINER_SCOPEDALLOC_DUMMYTRUE>& other)
|
||||
: outer_allocator_type(other.outer_allocator())
|
||||
{}
|
||||
|
||||
template <class OuterA2>
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base
|
||||
inline scoped_allocator_adaptor_base
|
||||
(BOOST_RV_REF_BEG scoped_allocator_adaptor_base<OuterA2 BOOST_CONTAINER_SCOPEDALLOC_DUMMYTRUE> BOOST_RV_REF_END other)
|
||||
: outer_allocator_type(other.outer_allocator())
|
||||
{}
|
||||
@@ -470,44 +470,44 @@ class scoped_allocator_adaptor_base< OuterAlloc BOOST_CONTAINER_SCOPEDALLOC_DUMM
|
||||
struct internal_type_t{};
|
||||
|
||||
template <class OuterA2>
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(internal_type_t, BOOST_FWD_REF(OuterA2) outerAlloc, const inner_allocator_type &)
|
||||
inline scoped_allocator_adaptor_base(internal_type_t, BOOST_FWD_REF(OuterA2) outerAlloc, const inner_allocator_type &)
|
||||
: outer_allocator_type(::boost::forward<OuterA2>(outerAlloc))
|
||||
{}
|
||||
|
||||
public:
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base &operator=(BOOST_COPY_ASSIGN_REF(scoped_allocator_adaptor_base) other)
|
||||
inline scoped_allocator_adaptor_base &operator=(BOOST_COPY_ASSIGN_REF(scoped_allocator_adaptor_base) other)
|
||||
{
|
||||
outer_allocator_type::operator=(other.outer_allocator());
|
||||
return *this;
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base &operator=(BOOST_RV_REF(scoped_allocator_adaptor_base) other)
|
||||
inline scoped_allocator_adaptor_base &operator=(BOOST_RV_REF(scoped_allocator_adaptor_base) other)
|
||||
{
|
||||
outer_allocator_type::operator=(boost::move(other.outer_allocator()));
|
||||
return *this;
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE void swap(scoped_allocator_adaptor_base &r)
|
||||
inline void swap(scoped_allocator_adaptor_base &r)
|
||||
{
|
||||
boost::adl_move_swap(this->outer_allocator(), r.outer_allocator());
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend void swap(scoped_allocator_adaptor_base &l, scoped_allocator_adaptor_base &r)
|
||||
inline friend void swap(scoped_allocator_adaptor_base &l, scoped_allocator_adaptor_base &r)
|
||||
{ l.swap(r); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE inner_allocator_type& inner_allocator()
|
||||
inline inner_allocator_type& inner_allocator()
|
||||
{ return static_cast<inner_allocator_type&>(*this); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE inner_allocator_type const& inner_allocator() const
|
||||
inline inner_allocator_type const& inner_allocator() const
|
||||
{ return static_cast<const inner_allocator_type&>(*this); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE outer_allocator_type & outer_allocator()
|
||||
inline outer_allocator_type & outer_allocator()
|
||||
{ return static_cast<outer_allocator_type&>(*this); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE const outer_allocator_type &outer_allocator() const
|
||||
inline const outer_allocator_type &outer_allocator() const
|
||||
{ return static_cast<const outer_allocator_type&>(*this); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_type select_on_container_copy_construction() const
|
||||
inline scoped_allocator_type select_on_container_copy_construction() const
|
||||
{
|
||||
return scoped_allocator_type
|
||||
(internal_type_t()
|
||||
@@ -639,21 +639,21 @@ class scoped_allocator_adaptor
|
||||
|
||||
//! <b>Effects</b>: value-initializes the OuterAlloc base class
|
||||
//! and the inner allocator object.
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor()
|
||||
inline scoped_allocator_adaptor()
|
||||
{}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE ~scoped_allocator_adaptor()
|
||||
inline ~scoped_allocator_adaptor()
|
||||
{}
|
||||
|
||||
//! <b>Effects</b>: initializes each allocator within the adaptor with
|
||||
//! the corresponding allocator from other.
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor(const scoped_allocator_adaptor& other)
|
||||
inline scoped_allocator_adaptor(const scoped_allocator_adaptor& other)
|
||||
: base_type(other.base())
|
||||
{}
|
||||
|
||||
//! <b>Effects</b>: move constructs each allocator within the adaptor with
|
||||
//! the corresponding allocator from other.
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor(BOOST_RV_REF(scoped_allocator_adaptor) other)
|
||||
inline scoped_allocator_adaptor(BOOST_RV_REF(scoped_allocator_adaptor) other)
|
||||
: base_type(::boost::move(other.base()))
|
||||
{}
|
||||
|
||||
@@ -665,14 +665,14 @@ class scoped_allocator_adaptor
|
||||
//! with innerAllocs...(hence recursively initializing each allocator within the adaptor with the
|
||||
//! corresponding allocator from the argument list).
|
||||
template <class OuterA2>
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor(BOOST_FWD_REF(OuterA2) outerAlloc, const InnerAllocs & ...innerAllocs)
|
||||
inline scoped_allocator_adaptor(BOOST_FWD_REF(OuterA2) outerAlloc, const InnerAllocs & ...innerAllocs)
|
||||
: base_type(::boost::forward<OuterA2>(outerAlloc), innerAllocs...)
|
||||
{}
|
||||
#else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
|
||||
#define BOOST_CONTAINER_SCOPED_ALLOCATOR_ADAPTOR_RELATED_ALLOCATOR_CONSTRUCTOR_CODE(N)\
|
||||
template <class OuterA2>\
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor(BOOST_FWD_REF(OuterA2) outerAlloc BOOST_MOVE_I##N BOOST_MOVE_CREF##N)\
|
||||
inline 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)\
|
||||
{}\
|
||||
//
|
||||
@@ -685,7 +685,7 @@ class scoped_allocator_adaptor
|
||||
//!
|
||||
//! <b>Effects</b>: initializes each allocator within the adaptor with the corresponding allocator from other.
|
||||
template <class OuterA2>
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor(const scoped_allocator_adaptor<OuterA2, BOOST_CONTAINER_SCOPEDALLOC_ALLINNER> &other)
|
||||
inline scoped_allocator_adaptor(const scoped_allocator_adaptor<OuterA2, BOOST_CONTAINER_SCOPEDALLOC_ALLINNER> &other)
|
||||
: base_type(other.base())
|
||||
{}
|
||||
|
||||
@@ -694,15 +694,15 @@ class scoped_allocator_adaptor
|
||||
//! <b>Effects</b>: initializes each allocator within the adaptor with the corresponding allocator
|
||||
//! rvalue from other.
|
||||
template <class OuterA2>
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor(BOOST_RV_REF_BEG scoped_allocator_adaptor
|
||||
inline scoped_allocator_adaptor(BOOST_RV_REF_BEG scoped_allocator_adaptor
|
||||
<OuterA2, BOOST_CONTAINER_SCOPEDALLOC_ALLINNER> BOOST_RV_REF_END other)
|
||||
: base_type(::boost::move(other.base()))
|
||||
{}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor &operator=(BOOST_COPY_ASSIGN_REF(scoped_allocator_adaptor) other)
|
||||
inline 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))); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor &operator=(BOOST_RV_REF(scoped_allocator_adaptor) other)
|
||||
inline scoped_allocator_adaptor &operator=(BOOST_RV_REF(scoped_allocator_adaptor) other)
|
||||
{ return static_cast<scoped_allocator_adaptor&>(base_type::operator=(boost::move(other.base()))); }
|
||||
|
||||
#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
@@ -734,13 +734,13 @@ class scoped_allocator_adaptor
|
||||
|
||||
//! <b>Returns</b>:
|
||||
//! <code>allocator_traits<OuterAlloc>:: max_size(outer_allocator())</code>.
|
||||
BOOST_CONTAINER_FORCEINLINE size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
inline size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return outer_traits_type::max_size(this->outer_allocator()); }
|
||||
|
||||
//! <b>Effects</b>:
|
||||
//! calls <code>OUTERMOST_ALLOC_TRAITS(*this):: destroy(OUTERMOST(*this), p)</code>.
|
||||
template <class T>
|
||||
BOOST_CONTAINER_FORCEINLINE void destroy(T* p) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
inline void destroy(T* p) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
allocator_traits<typename outermost_allocator<OuterAlloc>::type>
|
||||
::destroy(get_outermost_allocator(this->outer_allocator()), p);
|
||||
@@ -748,17 +748,17 @@ class scoped_allocator_adaptor
|
||||
|
||||
//! <b>Returns</b>:
|
||||
//! <code>allocator_traits<OuterAlloc>::allocate(outer_allocator(), n)</code>.
|
||||
BOOST_CONTAINER_FORCEINLINE pointer allocate(size_type n)
|
||||
inline pointer allocate(size_type n)
|
||||
{ return outer_traits_type::allocate(this->outer_allocator(), n); }
|
||||
|
||||
//! <b>Returns</b>:
|
||||
//! <code>allocator_traits<OuterAlloc>::allocate(outer_allocator(), n, hint)</code>.
|
||||
BOOST_CONTAINER_FORCEINLINE pointer allocate(size_type n, const_void_pointer hint)
|
||||
inline pointer allocate(size_type n, const_void_pointer hint)
|
||||
{ return outer_traits_type::allocate(this->outer_allocator(), n, hint); }
|
||||
|
||||
//! <b>Effects</b>:
|
||||
//! <code>allocator_traits<OuterAlloc>::deallocate(outer_allocator(), p, n)</code>.
|
||||
BOOST_CONTAINER_FORCEINLINE void deallocate(pointer p, size_type n)
|
||||
inline void deallocate(pointer p, size_type n)
|
||||
{ outer_traits_type::deallocate(this->outer_allocator(), p, n); }
|
||||
|
||||
#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
@@ -770,9 +770,9 @@ class scoped_allocator_adaptor
|
||||
#endif //BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
BOOST_CONTAINER_FORCEINLINE base_type &base() { return *this; }
|
||||
inline base_type &base() { return *this; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE const base_type &base() const { return *this; }
|
||||
inline const base_type &base() const { return *this; }
|
||||
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
@@ -806,7 +806,7 @@ class scoped_allocator_adaptor
|
||||
//! 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]
|
||||
template < typename T, class ...Args>
|
||||
BOOST_CONTAINER_FORCEINLINE void construct(T* p, BOOST_FWD_REF(Args)...args)
|
||||
inline void construct(T* p, BOOST_FWD_REF(Args)...args)
|
||||
{
|
||||
dtl::dispatch_uses_allocator
|
||||
( (get_outermost_allocator)(this->outer_allocator())
|
||||
@@ -819,7 +819,7 @@ class scoped_allocator_adaptor
|
||||
//overload selection problems when the first parameter is a pair.
|
||||
#define BOOST_CONTAINER_SCOPED_ALLOCATOR_CONSTRUCT_CODE(N) \
|
||||
template < typename T BOOST_MOVE_I##N BOOST_MOVE_CLASSQ##N >\
|
||||
BOOST_CONTAINER_FORCEINLINE void construct(T* p BOOST_MOVE_I##N BOOST_MOVE_UREFQ##N)\
|
||||
inline void construct(T* p BOOST_MOVE_I##N BOOST_MOVE_UREFQ##N)\
|
||||
{\
|
||||
dtl::dispatch_uses_allocator\
|
||||
( (get_outermost_allocator)(this->outer_allocator())\
|
||||
@@ -836,7 +836,7 @@ class scoped_allocator_adaptor
|
||||
public:
|
||||
//Internal function
|
||||
template <class OuterA2>
|
||||
BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor(internal_type_t, BOOST_FWD_REF(OuterA2) outer, const inner_allocator_type& inner)
|
||||
inline 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)
|
||||
{}
|
||||
|
||||
@@ -851,17 +851,17 @@ struct scoped_allocator_operator_equal
|
||||
//Optimize equal outer allocator types with
|
||||
//allocator_traits::equal which uses is_always_equal
|
||||
template<class IA>
|
||||
BOOST_CONTAINER_FORCEINLINE static bool equal_outer(const IA &l, const IA &r)
|
||||
inline static bool equal_outer(const IA &l, const IA &r)
|
||||
{ return allocator_traits<IA>::equal(l, r); }
|
||||
|
||||
//Otherwise compare it normally
|
||||
template<class IA1, class IA2>
|
||||
BOOST_CONTAINER_FORCEINLINE static bool equal_outer(const IA1 &l, const IA2 &r)
|
||||
inline static bool equal_outer(const IA1 &l, const IA2 &r)
|
||||
{ return l == r; }
|
||||
|
||||
//Otherwise compare it normally
|
||||
template<class IA>
|
||||
BOOST_CONTAINER_FORCEINLINE static bool equal_inner(const IA &l, const IA &r)
|
||||
inline static bool equal_inner(const IA &l, const IA &r)
|
||||
{ return allocator_traits<IA>::equal(l, r); }
|
||||
};
|
||||
|
||||
@@ -873,14 +873,14 @@ struct scoped_allocator_operator_equal<true>
|
||||
//inner_allocator_type is the same as outer_allocator_type
|
||||
//so both types can be different in operator==
|
||||
template<class IA1, class IA2>
|
||||
BOOST_CONTAINER_FORCEINLINE static bool equal_inner(const IA1 &, const IA2 &)
|
||||
inline static bool equal_inner(const IA1 &, const IA2 &)
|
||||
{ return true; }
|
||||
};
|
||||
|
||||
/// @endcond
|
||||
|
||||
template <typename OuterA1, typename OuterA2, BOOST_CONTAINER_SCOPEDALLOC_ALLINNERCLASS>
|
||||
BOOST_CONTAINER_FORCEINLINE bool operator==(const scoped_allocator_adaptor<OuterA1, BOOST_CONTAINER_SCOPEDALLOC_ALLINNER>& a
|
||||
inline bool operator==(const scoped_allocator_adaptor<OuterA1, BOOST_CONTAINER_SCOPEDALLOC_ALLINNER>& a
|
||||
,const scoped_allocator_adaptor<OuterA2, BOOST_CONTAINER_SCOPEDALLOC_ALLINNER>& b)
|
||||
{
|
||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
@@ -894,7 +894,7 @@ BOOST_CONTAINER_FORCEINLINE bool operator==(const scoped_allocator_adaptor<Outer
|
||||
}
|
||||
|
||||
template <typename OuterA1, typename OuterA2, BOOST_CONTAINER_SCOPEDALLOC_ALLINNERCLASS>
|
||||
BOOST_CONTAINER_FORCEINLINE bool operator!=(const scoped_allocator_adaptor<OuterA1, BOOST_CONTAINER_SCOPEDALLOC_ALLINNER>& a
|
||||
inline bool operator!=(const scoped_allocator_adaptor<OuterA1, BOOST_CONTAINER_SCOPEDALLOC_ALLINNER>& a
|
||||
,const scoped_allocator_adaptor<OuterA2, BOOST_CONTAINER_SCOPEDALLOC_ALLINNER>& b)
|
||||
{ return !(a == b); }
|
||||
|
||||
|
||||
Reference in new issue
Block a user