forked from boostorg/container
Merging into release branch for 1.49
[SVN r76247]
This commit is contained in:
@@ -340,7 +340,8 @@ class set
|
||||
{ return this->insert(const_cast<const T &>(x)); }
|
||||
|
||||
template<class U>
|
||||
std::pair<iterator,bool> insert(const U &u, typename container_detail::enable_if_c<container_detail::is_same<T, U>::value && !::boost::has_move_emulation_enabled<U>::value >::type* =0)
|
||||
std::pair<iterator,bool> insert(const U &u
|
||||
, typename container_detail::enable_if_c<container_detail::is_same<T, U>::value && !::boost::has_move_emulation_enabled<U>::value >::type* =0)
|
||||
{ return priv_insert(u); }
|
||||
#endif
|
||||
|
||||
@@ -372,7 +373,8 @@ class set
|
||||
{ return this->insert(position, const_cast<const T &>(x)); }
|
||||
|
||||
template<class U>
|
||||
iterator insert(const_iterator position, const U &u, typename container_detail::enable_if_c<container_detail::is_same<T, U>::value && !::boost::has_move_emulation_enabled<U>::value >::type* =0)
|
||||
iterator insert( const_iterator position, const U &u
|
||||
, typename container_detail::enable_if_c<container_detail::is_same<T, U>::value && !::boost::has_move_emulation_enabled<U>::value >::type* =0)
|
||||
{ return priv_insert(position, u); }
|
||||
#endif
|
||||
|
||||
@@ -397,18 +399,22 @@ class set
|
||||
|
||||
#if defined(BOOST_CONTAINER_PERFECT_FORWARDING) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
|
||||
//! <b>Effects</b>: Inserts an object of type T constructed with
|
||||
//! <b>Effects</b>: Inserts an object x of type T constructed with
|
||||
//! std::forward<Args>(args)... if and only if there is
|
||||
//! no element in the container with equivalent value.
|
||||
//! and returns the iterator pointing to the
|
||||
//! newly inserted element.
|
||||
//! newly inserted element.
|
||||
//!
|
||||
//! <b>Returns</b>: The bool component of the returned pair is true if and only
|
||||
//! if the insertion takes place, and the iterator component of the pair
|
||||
//! points to the element with key equivalent to the key of x.
|
||||
//!
|
||||
//! <b>Throws</b>: If memory allocation throws or
|
||||
//! T's in-place constructor throws.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
template <class... Args>
|
||||
iterator emplace(Args&&... args)
|
||||
std::pair<iterator,bool> emplace(Args&&... args)
|
||||
{ return m_tree.emplace_unique(boost::forward<Args>(args)...); }
|
||||
|
||||
//! <b>Effects</b>: Inserts an object of type T constructed with
|
||||
@@ -428,14 +434,14 @@ class set
|
||||
|
||||
#define BOOST_PP_LOCAL_MACRO(n) \
|
||||
BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >) \
|
||||
iterator emplace(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
|
||||
{ return m_tree.emplace_unique(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); } \
|
||||
std::pair<iterator,bool> emplace(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
|
||||
{ return m_tree.emplace_unique(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); } \
|
||||
\
|
||||
BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >) \
|
||||
iterator emplace_hint(const_iterator hint \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
|
||||
{ return m_tree.emplace_hint_unique(hint \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _));} \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _));} \
|
||||
//!
|
||||
#define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
|
||||
#include BOOST_PP_LOCAL_ITERATE()
|
||||
@@ -902,7 +908,8 @@ class multiset
|
||||
{ return this->insert(const_cast<const T &>(x)); }
|
||||
|
||||
template<class U>
|
||||
iterator insert(const U &u, typename container_detail::enable_if_c<container_detail::is_same<T, U>::value && !::boost::has_move_emulation_enabled<U>::value >::type* =0)
|
||||
iterator insert(const U &u
|
||||
, typename container_detail::enable_if_c<container_detail::is_same<T, U>::value && !::boost::has_move_emulation_enabled<U>::value >::type* =0)
|
||||
{ return priv_insert(u); }
|
||||
#endif
|
||||
|
||||
@@ -932,7 +939,8 @@ class multiset
|
||||
{ return this->insert(position, const_cast<const T &>(x)); }
|
||||
|
||||
template<class U>
|
||||
iterator insert(const_iterator position, const U &u, typename container_detail::enable_if_c<container_detail::is_same<T, U>::value && !::boost::has_move_emulation_enabled<U>::value >::type* =0)
|
||||
iterator insert( const_iterator position, const U &u
|
||||
, typename container_detail::enable_if_c<container_detail::is_same<T, U>::value && !::boost::has_move_emulation_enabled<U>::value >::type* =0)
|
||||
{ return priv_insert(position, u); }
|
||||
#endif
|
||||
|
||||
@@ -983,14 +991,14 @@ class multiset
|
||||
|
||||
#define BOOST_PP_LOCAL_MACRO(n) \
|
||||
BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >) \
|
||||
iterator emplace(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
|
||||
{ return m_tree.emplace_equal(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); } \
|
||||
iterator emplace(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
|
||||
{ return m_tree.emplace_equal(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); } \
|
||||
\
|
||||
BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >) \
|
||||
iterator emplace_hint(const_iterator hint \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
|
||||
{ return m_tree.emplace_hint_equal(hint \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _));} \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _));} \
|
||||
//!
|
||||
#define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
|
||||
#include BOOST_PP_LOCAL_ITERATE()
|
||||
|
||||
Reference in New Issue
Block a user