summaryrefslogtreecommitdiff
path: root/boost/intrusive
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 06:11:01 (GMT)
committerDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 06:11:01 (GMT)
commit3fdc3e5ee96dca5b11d1694975a65200787eab86 (patch)
tree5c1733853892b8397d67706fa453a9bd978d2102 /boost/intrusive
parent88e602c57797660ebe0f9e15dbd64c1ff16dead3 (diff)
downloadboost-3fdc3e5ee96dca5b11d1694975a65200787eab86.zip
boost-3fdc3e5ee96dca5b11d1694975a65200787eab86.tar.gz
boost-3fdc3e5ee96dca5b11d1694975a65200787eab86.tar.bz2
Imported Upstream version 1.66.0upstream/1.66.0
Diffstat (limited to 'boost/intrusive')
-rw-r--r--boost/intrusive/bstree.hpp11
-rw-r--r--boost/intrusive/circular_list_algorithms.hpp2
-rw-r--r--boost/intrusive/detail/mpl.hpp20
-rw-r--r--boost/intrusive/hashtable.hpp11
-rw-r--r--boost/intrusive/list.hpp11
-rw-r--r--boost/intrusive/slist.hpp11
6 files changed, 52 insertions, 14 deletions
diff --git a/boost/intrusive/bstree.hpp b/boost/intrusive/bstree.hpp
index ac67e86..410eedf 100644
--- a/boost/intrusive/bstree.hpp
+++ b/boost/intrusive/bstree.hpp
@@ -725,15 +725,22 @@ class bstree_impl
this->insert_equal(b, e);
}
- //! <b>Effects</b>: to-do
+ //! <b>Effects</b>: Constructs a container moving resources from another container.
+ //! Internal comparison object and value traits are move constructed and
+ //! nodes belonging to x (except the node representing the "end") are linked to *this.
//!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: If value_traits::node_traits::node's
+ //! move constructor throws (this does not happen with predefined Boost.Intrusive hooks)
+ //! or the move constructor of the comparison objet throws.
bstree_impl(BOOST_RV_REF(bstree_impl) x)
: data_type(::boost::move(x.comp()), ::boost::move(x.get_value_traits()))
{
this->swap(x);
}
- //! <b>Effects</b>: to-do
+ //! <b>Effects</b>: Equivalent to swap
//!
BOOST_INTRUSIVE_FORCEINLINE bstree_impl& operator=(BOOST_RV_REF(bstree_impl) x)
{ this->swap(x); return *this; }
diff --git a/boost/intrusive/circular_list_algorithms.hpp b/boost/intrusive/circular_list_algorithms.hpp
index 72eae32..0bc4d9d 100644
--- a/boost/intrusive/circular_list_algorithms.hpp
+++ b/boost/intrusive/circular_list_algorithms.hpp
@@ -69,7 +69,7 @@ class circular_list_algorithms
//! <b>Throws</b>: Nothing.
BOOST_INTRUSIVE_FORCEINLINE static void init(const node_ptr &this_node)
{
- const node_ptr null_node((node_ptr()));
+ const node_ptr null_node = node_ptr();
NodeTraits::set_next(this_node, null_node);
NodeTraits::set_previous(this_node, null_node);
}
diff --git a/boost/intrusive/detail/mpl.hpp b/boost/intrusive/detail/mpl.hpp
index 8d227a1..1523088 100644
--- a/boost/intrusive/detail/mpl.hpp
+++ b/boost/intrusive/detail/mpl.hpp
@@ -86,8 +86,8 @@ struct ls_zeros<1>
// Infrastructure for providing a default type for T::TNAME if absent.
#define BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(TNAME) \
- template <typename T, typename DefaultType> \
- struct boost_intrusive_default_type_ ## TNAME \
+ template <typename T> \
+ struct boost_intrusive_has_type_ ## TNAME \
{ \
template <typename X> \
static char test(int, typename X::TNAME*); \
@@ -95,13 +95,18 @@ struct ls_zeros<1>
template <typename X> \
static int test(...); \
\
- struct DefaultWrap { typedef DefaultType TNAME; }; \
- \
static const bool value = (1 == sizeof(test<T>(0, 0))); \
+ }; \
+ \
+ template <typename T, typename DefaultType> \
+ struct boost_intrusive_default_type_ ## TNAME \
+ { \
+ struct DefaultWrap { typedef DefaultType TNAME; }; \
\
typedef typename \
::boost::intrusive::detail::if_c \
- <value, T, DefaultWrap>::type::TNAME type; \
+ < boost_intrusive_has_type_ ## TNAME<T>::value \
+ , T, DefaultWrap>::type::TNAME type; \
}; \
//
@@ -110,6 +115,11 @@ struct ls_zeros<1>
boost_intrusive_default_type_ ## TNAME< T, TIMPL >::type \
//
+#define BOOST_INTRUSIVE_HAS_TYPE(INSTANTIATION_NS_PREFIX, T, TNAME) \
+ INSTANTIATION_NS_PREFIX \
+ boost_intrusive_has_type_ ## TNAME< T >::value \
+//
+
#define BOOST_INTRUSIVE_INSTANTIATE_EVAL_DEFAULT_TYPE_TMPLT(TNAME)\
template <typename T, typename DefaultType> \
struct boost_intrusive_eval_default_type_ ## TNAME \
diff --git a/boost/intrusive/hashtable.hpp b/boost/intrusive/hashtable.hpp
index bae9d52..6b1d5dd 100644
--- a/boost/intrusive/hashtable.hpp
+++ b/boost/intrusive/hashtable.hpp
@@ -1798,8 +1798,15 @@ class hashtable_impl
this->insert_equal(b, e);
}
- //! <b>Effects</b>: to-do
+ //! <b>Effects</b>: Constructs a container moving resources from another container.
+ //! Internal value traits, bucket traits, hasher and comparison are move constructed and
+ //! nodes belonging to x are linked to *this.
//!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: If value_traits::node_traits::node's
+ //! move constructor throws (this does not happen with predefined Boost.Intrusive hooks)
+ //! or the move constructor of value traits, bucket traits, hasher or comparison throws.
hashtable_impl(BOOST_RV_REF(hashtable_impl) x)
: internal_type( ::boost::move(x.priv_value_traits())
, ::boost::move(x.priv_bucket_traits())
@@ -1815,7 +1822,7 @@ class hashtable_impl
x.priv_split_traits().set_size(size_type(0));
}
- //! <b>Effects</b>: to-do
+ //! <b>Effects</b>: Equivalent to swap.
//!
hashtable_impl& operator=(BOOST_RV_REF(hashtable_impl) x)
{ this->swap(x); return *this; }
diff --git a/boost/intrusive/list.hpp b/boost/intrusive/list.hpp
index a955c44..71eac5c 100644
--- a/boost/intrusive/list.hpp
+++ b/boost/intrusive/list.hpp
@@ -215,8 +215,15 @@ class list_impl
this->insert(this->cend(), b, e);
}
- //! <b>Effects</b>: to-do
+ //! <b>Effects</b>: Constructs a container moving resources from another container.
+ //! Internal value traits are move constructed and
+ //! nodes belonging to x (except the node representing the "end") are linked to *this.
//!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: If value_traits::node_traits::node's
+ //! move constructor throws (this does not happen with predefined Boost.Intrusive hooks)
+ //! or the move constructor of value traits throws.
list_impl(BOOST_RV_REF(list_impl) x)
: data_(::boost::move(x.priv_value_traits()))
{
@@ -226,7 +233,7 @@ class list_impl
this->swap(x);
}
- //! <b>Effects</b>: to-do
+ //! <b>Effects</b>: Equivalent to swap
//!
list_impl& operator=(BOOST_RV_REF(list_impl) x)
{ this->swap(x); return *this; }
diff --git a/boost/intrusive/slist.hpp b/boost/intrusive/slist.hpp
index f34350d..1f7ace1 100644
--- a/boost/intrusive/slist.hpp
+++ b/boost/intrusive/slist.hpp
@@ -338,8 +338,15 @@ class slist_impl
this->insert_after(this->cbefore_begin(), b, e);
}
- //! <b>Effects</b>: to-do
+ //! <b>Effects</b>: Constructs a container moving resources from another container.
+ //! Internal value traits are move constructed and
+ //! nodes belonging to x (except the node representing the "end") are linked to *this.
//!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: If value_traits::node_traits::node's
+ //! move constructor throws (this does not happen with predefined Boost.Intrusive hooks)
+ //! or the move constructor of value traits throws.
slist_impl(BOOST_RV_REF(slist_impl) x)
: data_(::boost::move(x.priv_value_traits()))
{
@@ -348,7 +355,7 @@ class slist_impl
this->swap(x);
}
- //! <b>Effects</b>: to-do
+ //! <b>Effects</b>: Equivalent to swap
//!
slist_impl& operator=(BOOST_RV_REF(slist_impl) x)
{ this->swap(x); return *this; }