Marked some constructor as explicit and fixed trivial documentation issues

[SVN r85307]
This commit is contained in:
Ion Gaztañaga
2013-08-11 21:33:51 +00:00
parent fbba3159f0
commit b85b40e851
18 changed files with 85 additions and 69 deletions

View File

@@ -3368,10 +3368,10 @@ To analyze the thread safety, consider the following points:
[section:scary_iterators Scary Iterators] [section:scary_iterators Scary Iterators]
The paper N2913, titled [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2913.pdf, The paper N2913, titled [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2913.pdf,
SCARY Iterator Assignment and Initialization], proposed a requirement that a standard containers SCARY Iterator Assignment and Initialization], proposed a requirement that a standard container's
iterator types have no dependency on any type argument apart from the containers `value_type`, iterator types have no dependency on any type argument apart from the container's `value_type`,
`difference_type`, `pointer type`, and `const_pointer` type. In particular, according to the proposal, `difference_type`, `pointer type`, and `const_pointer` type. In particular, according to the proposal,
the types of a standard containers iterators should not depend on the containers `key_compare`, the types of a standard container's iterators should not depend on the container's `key_compare`,
`hasher`, `key_equal`, or `allocator` types. `hasher`, `key_equal`, or `allocator` types.
That paper demonstrated that SCARY operations were crucial to the performant implementation of common That paper demonstrated that SCARY operations were crucial to the performant implementation of common

View File

@@ -444,7 +444,7 @@ class avl_set
//Assert if passed value traits are compatible with the type //Assert if passed value traits are compatible with the type
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value)); BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
avl_set( const value_compare &cmp = value_compare() explicit avl_set( const value_compare &cmp = value_compare()
, const value_traits &v_traits = value_traits()) , const value_traits &v_traits = value_traits())
: Base(cmp, v_traits) : Base(cmp, v_traits)
{} {}
@@ -882,7 +882,7 @@ class avl_multiset
//Assert if passed value traits are compatible with the type //Assert if passed value traits are compatible with the type
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value)); BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
avl_multiset( const value_compare &cmp = value_compare() explicit avl_multiset( const value_compare &cmp = value_compare()
, const value_traits &v_traits = value_traits()) , const value_traits &v_traits = value_traits())
: Base(cmp, v_traits) : Base(cmp, v_traits)
{} {}

View File

@@ -30,7 +30,6 @@
#include <boost/intrusive/detail/mpl.hpp> #include <boost/intrusive/detail/mpl.hpp>
#include <boost/intrusive/pointer_traits.hpp> #include <boost/intrusive/pointer_traits.hpp>
#include <boost/intrusive/pointer_traits.hpp> #include <boost/intrusive/pointer_traits.hpp>
#include <boost/intrusive/detail/clear_on_destructor_base.hpp>
#include <boost/intrusive/options.hpp> #include <boost/intrusive/options.hpp>
#include <boost/intrusive/detail/utilities.hpp> #include <boost/intrusive/detail/utilities.hpp>
#include <boost/intrusive/avltree_algorithms.hpp> #include <boost/intrusive/avltree_algorithms.hpp>
@@ -497,7 +496,7 @@ class avltree
//Assert if passed value traits are compatible with the type //Assert if passed value traits are compatible with the type
BOOST_STATIC_ASSERT((detail::is_same<typename real_value_traits::value_type, T>::value)); BOOST_STATIC_ASSERT((detail::is_same<typename real_value_traits::value_type, T>::value));
avltree( const value_compare &cmp = value_compare() explicit avltree( const value_compare &cmp = value_compare()
, const value_traits &v_traits = value_traits()) , const value_traits &v_traits = value_traits())
: Base(cmp, v_traits) : Base(cmp, v_traits)
{} {}

View File

@@ -442,7 +442,7 @@ class bs_set
//Assert if passed value traits are compatible with the type //Assert if passed value traits are compatible with the type
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value)); BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
bs_set( const value_compare &cmp = value_compare() explicit bs_set( const value_compare &cmp = value_compare()
, const value_traits &v_traits = value_traits()) , const value_traits &v_traits = value_traits())
: Base(cmp, v_traits) : Base(cmp, v_traits)
{} {}
@@ -880,7 +880,7 @@ class bs_multiset
//Assert if passed value traits are compatible with the type //Assert if passed value traits are compatible with the type
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value)); BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
bs_multiset( const value_compare &cmp = value_compare() explicit bs_multiset( const value_compare &cmp = value_compare()
, const value_traits &v_traits = value_traits()) , const value_traits &v_traits = value_traits())
: Base(cmp, v_traits) : Base(cmp, v_traits)
{} {}

View File

@@ -476,9 +476,12 @@ template<class ValueTraits, class VoidKeyComp, class SizeType, bool ConstantTime
#endif #endif
class bstree_impl class bstree_impl
: public bstbase<ValueTraits, VoidKeyComp, ConstantTimeSize, SizeType, AlgoType> : public bstbase<ValueTraits, VoidKeyComp, ConstantTimeSize, SizeType, AlgoType>
, private detail::clear_on_destructor_base<bstree_impl<ValueTraits, VoidKeyComp, SizeType, ConstantTimeSize, AlgoType> > , private detail::clear_on_destructor_base
< bstree_impl<ValueTraits, VoidKeyComp, SizeType, ConstantTimeSize, AlgoType>
, is_safe_autounlink<detail::get_real_value_traits<ValueTraits>::type::link_mode>::value
>
{ {
template<class C> friend class detail::clear_on_destructor_base; template<class C, bool> friend class detail::clear_on_destructor_base;
public: public:
typedef ValueTraits value_traits; typedef ValueTraits value_traits;
/// @cond /// @cond
@@ -592,6 +595,7 @@ class bstree_impl
bstree_impl& operator=(BOOST_RV_REF(bstree_impl) x) bstree_impl& operator=(BOOST_RV_REF(bstree_impl) x)
{ this->swap(x); return *this; } { this->swap(x); return *this; }
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
//! <b>Effects</b>: Detaches all elements from this. The objects in the set //! <b>Effects</b>: Detaches all elements from this. The objects in the set
//! are not deleted (i.e. no destructors are called), but the nodes according to //! are not deleted (i.e. no destructors are called), but the nodes according to
//! the value_traits template parameter are reinitialized and thus can be reused. //! the value_traits template parameter are reinitialized and thus can be reused.
@@ -602,8 +606,6 @@ class bstree_impl
~bstree_impl() ~bstree_impl()
{} {}
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
//! <b>Effects</b>: Returns an iterator pointing to the beginning of the container. //! <b>Effects</b>: Returns an iterator pointing to the beginning of the container.
//! //!
//! <b>Complexity</b>: Constant. //! <b>Complexity</b>: Constant.

View File

@@ -17,7 +17,7 @@ namespace boost {
namespace intrusive { namespace intrusive {
namespace detail { namespace detail {
template<class Derived> template<class Derived, bool DoClear = true>
class clear_on_destructor_base class clear_on_destructor_base
{ {
protected: protected:
@@ -27,6 +27,10 @@ class clear_on_destructor_base
} }
}; };
template<class Derived>
class clear_on_destructor_base<Derived, false>
{};
} // namespace detail { } // namespace detail {
} // namespace intrusive { } // namespace intrusive {
} // namespace boost { } // namespace boost {

View File

@@ -1092,9 +1092,12 @@ class hashtable_impl
< SizeType < SizeType
, BoolFlags & hashtable_data_bool_flags_mask , BoolFlags & hashtable_data_bool_flags_mask
, VoidOrKeyHash, VoidOrKeyEqual, ValueTraits, BucketTraits> , VoidOrKeyHash, VoidOrKeyEqual, ValueTraits, BucketTraits>
, private detail::clear_on_destructor_base<hashtable_impl<ValueTraits, VoidOrKeyHash, VoidOrKeyEqual, SizeType, BucketTraits, BoolFlags> > , private detail::clear_on_destructor_base
< hashtable_impl<ValueTraits, VoidOrKeyHash, VoidOrKeyEqual, SizeType, BucketTraits, BoolFlags>
, is_safe_autounlink<detail::get_real_value_traits<ValueTraits>::type::link_mode>::value
>
{ {
template<class C> friend class detail::clear_on_destructor_base; template<class C, bool> friend class detail::clear_on_destructor_base;
public: public:
typedef ValueTraits value_traits; typedef ValueTraits value_traits;
@@ -1284,6 +1287,7 @@ class hashtable_impl
hashtable_impl& operator=(BOOST_RV_REF(hashtable_impl) x) hashtable_impl& operator=(BOOST_RV_REF(hashtable_impl) x)
{ this->swap(x); return *this; } { this->swap(x); return *this; }
#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
//! <b>Effects</b>: Detaches all elements from this. The objects in the unordered_set //! <b>Effects</b>: Detaches all elements from this. The objects in the unordered_set
//! are not deleted (i.e. no destructors are called). //! are not deleted (i.e. no destructors are called).
//! //!
@@ -1293,6 +1297,7 @@ class hashtable_impl
//! <b>Throws</b>: Nothing. //! <b>Throws</b>: Nothing.
~hashtable_impl() ~hashtable_impl()
{} {}
#endif
//! <b>Effects</b>: Returns an iterator pointing to the beginning of the unordered_set. //! <b>Effects</b>: Returns an iterator pointing to the beginning of the unordered_set.
//! //!
@@ -3114,7 +3119,7 @@ class hashtable
//Assert if passed value traits are compatible with the type //Assert if passed value traits are compatible with the type
BOOST_STATIC_ASSERT((detail::is_same<typename real_value_traits::value_type, T>::value)); BOOST_STATIC_ASSERT((detail::is_same<typename real_value_traits::value_type, T>::value));
hashtable ( const bucket_traits &b_traits explicit hashtable ( const bucket_traits &b_traits
, const hasher & hash_func = hasher() , const hasher & hash_func = hasher()
, const key_equal &equal_func = key_equal() , const key_equal &equal_func = key_equal()
, const value_traits &v_traits = value_traits()) , const value_traits &v_traits = value_traits())

View File

@@ -63,9 +63,12 @@ template<class T, class ...Options>
template <class ValueTraits, class SizeType, bool ConstantTimeSize> template <class ValueTraits, class SizeType, bool ConstantTimeSize>
#endif #endif
class list_impl class list_impl
: private detail::clear_on_destructor_base< list_impl<ValueTraits, SizeType, ConstantTimeSize> > : private detail::clear_on_destructor_base
< list_impl<ValueTraits, SizeType, ConstantTimeSize>
, is_safe_autounlink<detail::get_real_value_traits<ValueTraits>::type::link_mode>::value
>
{ {
template<class C> friend class detail::clear_on_destructor_base; template<class C, bool> friend class detail::clear_on_destructor_base;
//Public typedefs //Public typedefs
public: public:
typedef ValueTraits value_traits; typedef ValueTraits value_traits;
@@ -123,7 +126,7 @@ class list_impl
struct data_t : public value_traits struct data_t : public value_traits
{ {
typedef typename list_impl::value_traits value_traits; typedef typename list_impl::value_traits value_traits;
data_t(const value_traits &val_traits) explicit data_t(const value_traits &val_traits)
: value_traits(val_traits) : value_traits(val_traits)
{} {}
@@ -224,6 +227,7 @@ class list_impl
list_impl& operator=(BOOST_RV_REF(list_impl) x) list_impl& operator=(BOOST_RV_REF(list_impl) x)
{ this->swap(x); return *this; } { this->swap(x); return *this; }
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
//! <b>Effects</b>: If it's not a safe-mode or an auto-unlink value_type //! <b>Effects</b>: If it's not a safe-mode or an auto-unlink value_type
//! the destructor does nothing //! the destructor does nothing
//! (ie. no code is generated). Otherwise it detaches all elements from this. //! (ie. no code is generated). Otherwise it detaches all elements from this.
@@ -235,6 +239,7 @@ class list_impl
//! it's a safe-mode or auto-unlink value . Otherwise constant. //! it's a safe-mode or auto-unlink value . Otherwise constant.
~list_impl() ~list_impl()
{} {}
#endif
//! <b>Requires</b>: value must be an lvalue. //! <b>Requires</b>: value must be an lvalue.
//! //!
@@ -1473,7 +1478,7 @@ class list
typedef typename Base::iterator iterator; typedef typename Base::iterator iterator;
typedef typename Base::const_iterator const_iterator; typedef typename Base::const_iterator const_iterator;
list(const value_traits &v_traits = value_traits()) explicit list(const value_traits &v_traits = value_traits())
: Base(v_traits) : Base(v_traits)
{} {}

View File

@@ -27,7 +27,6 @@
#include <boost/intrusive/detail/ebo_functor_holder.hpp> #include <boost/intrusive/detail/ebo_functor_holder.hpp>
#include <boost/intrusive/detail/mpl.hpp> #include <boost/intrusive/detail/mpl.hpp>
#include <boost/intrusive/pointer_traits.hpp> #include <boost/intrusive/pointer_traits.hpp>
#include <boost/intrusive/detail/clear_on_destructor_base.hpp>
#include <boost/intrusive/detail/function_detector.hpp> #include <boost/intrusive/detail/function_detector.hpp>
#include <boost/intrusive/detail/utilities.hpp> #include <boost/intrusive/detail/utilities.hpp>
#include <boost/intrusive/options.hpp> #include <boost/intrusive/options.hpp>
@@ -493,7 +492,7 @@ class rbtree
//Assert if passed value traits are compatible with the type //Assert if passed value traits are compatible with the type
BOOST_STATIC_ASSERT((detail::is_same<typename real_value_traits::value_type, T>::value)); BOOST_STATIC_ASSERT((detail::is_same<typename real_value_traits::value_type, T>::value));
rbtree( const value_compare &cmp = value_compare() explicit rbtree( const value_compare &cmp = value_compare()
, const value_traits &v_traits = value_traits()) , const value_traits &v_traits = value_traits())
: Base(cmp, v_traits) : Base(cmp, v_traits)
{} {}

View File

@@ -443,7 +443,7 @@ class set
//Assert if passed value traits are compatible with the type //Assert if passed value traits are compatible with the type
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value)); BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
set( const value_compare &cmp = value_compare() explicit set( const value_compare &cmp = value_compare()
, const value_traits &v_traits = value_traits()) , const value_traits &v_traits = value_traits())
: Base(cmp, v_traits) : Base(cmp, v_traits)
{} {}

View File

@@ -455,7 +455,7 @@ class sg_set
//Assert if passed value traits are compatible with the type //Assert if passed value traits are compatible with the type
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value)); BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
sg_set( const value_compare &cmp = value_compare() explicit sg_set( const value_compare &cmp = value_compare()
, const value_traits &v_traits = value_traits()) , const value_traits &v_traits = value_traits())
: Base(cmp, v_traits) : Base(cmp, v_traits)
{} {}

View File

@@ -34,7 +34,6 @@
#include <boost/intrusive/detail/tree_node.hpp> #include <boost/intrusive/detail/tree_node.hpp>
#include <boost/intrusive/detail/ebo_functor_holder.hpp> #include <boost/intrusive/detail/ebo_functor_holder.hpp>
#include <boost/intrusive/pointer_traits.hpp> #include <boost/intrusive/pointer_traits.hpp>
#include <boost/intrusive/detail/clear_on_destructor_base.hpp>
#include <boost/intrusive/detail/mpl.hpp> #include <boost/intrusive/detail/mpl.hpp>
#include <boost/intrusive/detail/utilities.hpp> #include <boost/intrusive/detail/utilities.hpp>
#include <boost/intrusive/options.hpp> #include <boost/intrusive/options.hpp>
@@ -925,7 +924,7 @@ class sgtree
//Assert if passed value traits are compatible with the type //Assert if passed value traits are compatible with the type
BOOST_STATIC_ASSERT((detail::is_same<typename real_value_traits::value_type, T>::value)); BOOST_STATIC_ASSERT((detail::is_same<typename real_value_traits::value_type, T>::value));
sgtree( const value_compare &cmp = value_compare() explicit sgtree( const value_compare &cmp = value_compare()
, const value_traits &v_traits = value_traits()) , const value_traits &v_traits = value_traits())
: Base(cmp, v_traits) : Base(cmp, v_traits)
{} {}

View File

@@ -99,9 +99,12 @@ template<class T, class ...Options>
template<class ValueTraits, class SizeType, std::size_t BoolFlags> template<class ValueTraits, class SizeType, std::size_t BoolFlags>
#endif #endif
class slist_impl class slist_impl
: private detail::clear_on_destructor_base<slist_impl<ValueTraits, SizeType, BoolFlags> > : private detail::clear_on_destructor_base
< slist_impl<ValueTraits, SizeType, BoolFlags>
, is_safe_autounlink<detail::get_real_value_traits<ValueTraits>::type::link_mode>::value
>
{ {
template<class C> friend class detail::clear_on_destructor_base; template<class C, bool> friend class detail::clear_on_destructor_base;
//Public typedefs //Public typedefs
public: public:
typedef ValueTraits value_traits; typedef ValueTraits value_traits;
@@ -214,7 +217,7 @@ class slist_impl
: public slist_impl::value_traits : public slist_impl::value_traits
{ {
typedef typename slist_impl::value_traits value_traits; typedef typename slist_impl::value_traits value_traits;
data_t(const value_traits &val_traits) explicit data_t(const value_traits &val_traits)
: value_traits(val_traits) : value_traits(val_traits)
{} {}
@@ -349,6 +352,7 @@ class slist_impl
slist_impl& operator=(BOOST_RV_REF(slist_impl) x) slist_impl& operator=(BOOST_RV_REF(slist_impl) x)
{ this->swap(x); return *this; } { this->swap(x); return *this; }
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
//! <b>Effects</b>: If it's a safe-mode //! <b>Effects</b>: If it's a safe-mode
//! or auto-unlink value, the destructor does nothing //! or auto-unlink value, the destructor does nothing
//! (ie. no code is generated). Otherwise it detaches all elements from this. //! (ie. no code is generated). Otherwise it detaches all elements from this.
@@ -360,6 +364,7 @@ class slist_impl
//! it's a safe-mode or auto-unlink value. Otherwise constant. //! it's a safe-mode or auto-unlink value. Otherwise constant.
~slist_impl() ~slist_impl()
{} {}
#endif
//! <b>Effects</b>: Erases all the elements of the container. //! <b>Effects</b>: Erases all the elements of the container.
//! //!

View File

@@ -511,7 +511,7 @@ class splay_set
//Assert if passed value traits are compatible with the type //Assert if passed value traits are compatible with the type
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value)); BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
splay_set( const value_compare &cmp = value_compare() explicit splay_set( const value_compare &cmp = value_compare()
, const value_traits &v_traits = value_traits()) , const value_traits &v_traits = value_traits())
: Base(cmp, v_traits) : Base(cmp, v_traits)
{} {}
@@ -1018,7 +1018,7 @@ class splay_multiset
//Assert if passed value traits are compatible with the type //Assert if passed value traits are compatible with the type
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value)); BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
splay_multiset( const value_compare &cmp = value_compare() explicit splay_multiset( const value_compare &cmp = value_compare()
, const value_traits &v_traits = value_traits()) , const value_traits &v_traits = value_traits())
: Base(cmp, v_traits) : Base(cmp, v_traits)
{} {}

View File

@@ -27,7 +27,6 @@
#include <boost/intrusive/detail/ebo_functor_holder.hpp> #include <boost/intrusive/detail/ebo_functor_holder.hpp>
#include <boost/intrusive/detail/mpl.hpp> #include <boost/intrusive/detail/mpl.hpp>
#include <boost/intrusive/pointer_traits.hpp> #include <boost/intrusive/pointer_traits.hpp>
#include <boost/intrusive/detail/clear_on_destructor_base.hpp>
#include <boost/intrusive/detail/function_detector.hpp> #include <boost/intrusive/detail/function_detector.hpp>
#include <boost/intrusive/detail/utilities.hpp> #include <boost/intrusive/detail/utilities.hpp>
#include <boost/intrusive/options.hpp> #include <boost/intrusive/options.hpp>
@@ -654,7 +653,7 @@ class splaytree
//Assert if passed value traits are compatible with the type //Assert if passed value traits are compatible with the type
BOOST_STATIC_ASSERT((detail::is_same<typename real_value_traits::value_type, T>::value)); BOOST_STATIC_ASSERT((detail::is_same<typename real_value_traits::value_type, T>::value));
splaytree( const value_compare &cmp = value_compare() explicit splaytree( const value_compare &cmp = value_compare()
, const value_traits &v_traits = value_traits()) , const value_traits &v_traits = value_traits())
: Base(cmp, v_traits) : Base(cmp, v_traits)
{} {}

View File

@@ -27,7 +27,6 @@
#include <boost/intrusive/detail/tree_node.hpp> #include <boost/intrusive/detail/tree_node.hpp>
#include <boost/intrusive/detail/ebo_functor_holder.hpp> #include <boost/intrusive/detail/ebo_functor_holder.hpp>
#include <boost/intrusive/pointer_traits.hpp> #include <boost/intrusive/pointer_traits.hpp>
#include <boost/intrusive/detail/clear_on_destructor_base.hpp>
#include <boost/intrusive/detail/utilities.hpp> #include <boost/intrusive/detail/utilities.hpp>
#include <boost/intrusive/pointer_traits.hpp> #include <boost/intrusive/pointer_traits.hpp>
#include <boost/intrusive/options.hpp> #include <boost/intrusive/options.hpp>
@@ -1130,7 +1129,7 @@ class treap
//Assert if passed value traits are compatible with the type //Assert if passed value traits are compatible with the type
BOOST_STATIC_ASSERT((detail::is_same<typename real_value_traits::value_type, T>::value)); BOOST_STATIC_ASSERT((detail::is_same<typename real_value_traits::value_type, T>::value));
treap( const value_compare &cmp = value_compare() explicit treap( const value_compare &cmp = value_compare()
, const priority_compare &pcmp = priority_compare() , const priority_compare &pcmp = priority_compare()
, const value_traits &v_traits = value_traits()) , const value_traits &v_traits = value_traits())
: Base(cmp, pcmp, v_traits) : Base(cmp, pcmp, v_traits)

View File

@@ -471,7 +471,7 @@ class treap_set
//Assert if passed value traits are compatible with the type //Assert if passed value traits are compatible with the type
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value)); BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
treap_set( const value_compare &cmp = value_compare() explicit treap_set( const value_compare &cmp = value_compare()
, const priority_compare &pcmp = priority_compare() , const priority_compare &pcmp = priority_compare()
, const value_traits &v_traits = value_traits()) , const value_traits &v_traits = value_traits())
: Base(cmp, pcmp, v_traits) : Base(cmp, pcmp, v_traits)
@@ -937,7 +937,7 @@ class treap_multiset
//Assert if passed value traits are compatible with the type //Assert if passed value traits are compatible with the type
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value)); BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
treap_multiset( const value_compare &cmp = value_compare() explicit treap_multiset( const value_compare &cmp = value_compare()
, const priority_compare &pcmp = priority_compare() , const priority_compare &pcmp = priority_compare()
, const value_traits &v_traits = value_traits()) , const value_traits &v_traits = value_traits())
: Base(cmp, pcmp, v_traits) : Base(cmp, pcmp, v_traits)

View File

@@ -161,6 +161,7 @@ class unordered_set_impl
unordered_set_impl& operator=(BOOST_RV_REF(unordered_set_impl) x) unordered_set_impl& operator=(BOOST_RV_REF(unordered_set_impl) x)
{ return static_cast<unordered_set_impl&>(table_type::operator=(::boost::move(static_cast<table_type&>(x)))); } { return static_cast<unordered_set_impl&>(table_type::operator=(::boost::move(static_cast<table_type&>(x)))); }
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
//! <b>Effects</b>: Detaches all elements from this. The objects in the unordered_set //! <b>Effects</b>: Detaches all elements from this. The objects in the unordered_set
//! are not deleted (i.e. no destructors are called). //! are not deleted (i.e. no destructors are called).
//! //!
@@ -171,7 +172,6 @@ class unordered_set_impl
~unordered_set_impl() ~unordered_set_impl()
{} {}
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
//! <b>Effects</b>: Returns an iterator pointing to the beginning of the unordered_set. //! <b>Effects</b>: Returns an iterator pointing to the beginning of the unordered_set.
//! //!
//! <b>Complexity</b>: Constant time if `cache_begin<>` is true. Amortized //! <b>Complexity</b>: Constant time if `cache_begin<>` is true. Amortized
@@ -1089,7 +1089,7 @@ class unordered_set
typedef typename Base::hasher hasher; typedef typename Base::hasher hasher;
typedef typename Base::key_equal key_equal; typedef typename Base::key_equal key_equal;
unordered_set ( const bucket_traits &b_traits explicit unordered_set ( const bucket_traits &b_traits
, const hasher & hash_func = hasher() , const hasher & hash_func = hasher()
, const key_equal &equal_func = key_equal() , const key_equal &equal_func = key_equal()
, const value_traits &v_traits = value_traits()) , const value_traits &v_traits = value_traits())
@@ -1254,6 +1254,8 @@ class unordered_multiset_impl
unordered_multiset_impl& operator=(BOOST_RV_REF(unordered_multiset_impl) x) unordered_multiset_impl& operator=(BOOST_RV_REF(unordered_multiset_impl) x)
{ return static_cast<unordered_multiset_impl&>(table_type::operator=(::boost::move(static_cast<table_type&>(x)))); } { return static_cast<unordered_multiset_impl&>(table_type::operator=(::boost::move(static_cast<table_type&>(x)))); }
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
//! <b>Effects</b>: Detaches all elements from this. The objects in the unordered_multiset //! <b>Effects</b>: Detaches all elements from this. The objects in the unordered_multiset
//! are not deleted (i.e. no destructors are called). //! are not deleted (i.e. no destructors are called).
//! //!
@@ -1264,8 +1266,6 @@ class unordered_multiset_impl
~unordered_multiset_impl() ~unordered_multiset_impl()
{} {}
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
//! <b>Effects</b>: Returns an iterator pointing to the beginning of the unordered_multiset. //! <b>Effects</b>: Returns an iterator pointing to the beginning of the unordered_multiset.
//! //!
//! <b>Complexity</b>: Constant time if `cache_begin<>` is true. Amortized //! <b>Complexity</b>: Constant time if `cache_begin<>` is true. Amortized
@@ -2125,7 +2125,7 @@ class unordered_multiset
typedef typename Base::hasher hasher; typedef typename Base::hasher hasher;
typedef typename Base::key_equal key_equal; typedef typename Base::key_equal key_equal;
unordered_multiset( const bucket_traits &b_traits explicit unordered_multiset( const bucket_traits &b_traits
, const hasher & hash_func = hasher() , const hasher & hash_func = hasher()
, const key_equal &equal_func = key_equal() , const key_equal &equal_func = key_equal()
, const value_traits &v_traits = value_traits()) , const value_traits &v_traits = value_traits())