mirror of
https://github.com/boostorg/intrusive.git
synced 2025-08-02 14:04:36 +02:00
@@ -1274,6 +1274,8 @@ class avltree_impl
|
|||||||
node_algorithms::replace_node( get_real_value_traits().to_node_ptr(*replace_this)
|
node_algorithms::replace_node( get_real_value_traits().to_node_ptr(*replace_this)
|
||||||
, node_ptr(&priv_header())
|
, node_ptr(&priv_header())
|
||||||
, get_real_value_traits().to_node_ptr(with_this));
|
, get_real_value_traits().to_node_ptr(with_this));
|
||||||
|
if(safemode_or_autounlink)
|
||||||
|
node_algorithms::init(replace_this.pointed_node());
|
||||||
}
|
}
|
||||||
|
|
||||||
//! <b>Requires</b>: value must be an lvalue and shall be in a set of
|
//! <b>Requires</b>: value must be an lvalue and shall be in a set of
|
||||||
|
@@ -138,6 +138,10 @@ template <typename T>
|
|||||||
struct is_unary_or_binary_function_impl
|
struct is_unary_or_binary_function_impl
|
||||||
{ static const bool value = false; };
|
{ static const bool value = false; };
|
||||||
|
|
||||||
|
// see boost ticket #4094
|
||||||
|
// avoid duplicate definitions of is_unary_or_binary_function_impl
|
||||||
|
#ifndef BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
|
||||||
|
|
||||||
template <typename R>
|
template <typename R>
|
||||||
struct is_unary_or_binary_function_impl<R (*)()>
|
struct is_unary_or_binary_function_impl<R (*)()>
|
||||||
{ static const bool value = true; };
|
{ static const bool value = true; };
|
||||||
@@ -145,29 +149,17 @@ struct is_unary_or_binary_function_impl<R (*)()>
|
|||||||
template <typename R>
|
template <typename R>
|
||||||
struct is_unary_or_binary_function_impl<R (*)(...)>
|
struct is_unary_or_binary_function_impl<R (*)(...)>
|
||||||
{ static const bool value = true; };
|
{ static const bool value = true; };
|
||||||
/*
|
|
||||||
#ifdef BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
|
#else // BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
|
||||||
|
|
||||||
template <typename R>
|
template <typename R>
|
||||||
struct is_unary_or_binary_function_impl<R (__stdcall*)()>
|
struct is_unary_or_binary_function_impl<R (__stdcall*)()>
|
||||||
{ static const bool value = true; };
|
{ static const bool value = true; };
|
||||||
|
|
||||||
template <typename R>
|
|
||||||
struct is_unary_or_binary_function_impl<R (__stdcall*)(...)>
|
|
||||||
{ static const bool value = true; };
|
|
||||||
|
|
||||||
template <typename R>
|
|
||||||
struct is_unary_or_binary_function_impl<R (__stdcall*)(...)>
|
|
||||||
{ static const bool value = true; };
|
|
||||||
|
|
||||||
template <typename R>
|
template <typename R>
|
||||||
struct is_unary_or_binary_function_impl<R (__fastcall*)()>
|
struct is_unary_or_binary_function_impl<R (__fastcall*)()>
|
||||||
{ static const bool value = true; };
|
{ static const bool value = true; };
|
||||||
|
|
||||||
template <typename R>
|
|
||||||
struct is_unary_or_binary_function_impl<R (__fastcall*)(...)>
|
|
||||||
{ static const bool value = true; };
|
|
||||||
|
|
||||||
template <typename R>
|
template <typename R>
|
||||||
struct is_unary_or_binary_function_impl<R (__cdecl*)()>
|
struct is_unary_or_binary_function_impl<R (__cdecl*)()>
|
||||||
{ static const bool value = true; };
|
{ static const bool value = true; };
|
||||||
@@ -175,8 +167,13 @@ struct is_unary_or_binary_function_impl<R (__cdecl*)()>
|
|||||||
template <typename R>
|
template <typename R>
|
||||||
struct is_unary_or_binary_function_impl<R (__cdecl*)(...)>
|
struct is_unary_or_binary_function_impl<R (__cdecl*)(...)>
|
||||||
{ static const bool value = true; };
|
{ static const bool value = true; };
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
*/
|
|
||||||
|
// see boost ticket #4094
|
||||||
|
// avoid duplicate definitions of is_unary_or_binary_function_impl
|
||||||
|
#ifndef BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
|
||||||
|
|
||||||
template <typename R, class T0>
|
template <typename R, class T0>
|
||||||
struct is_unary_or_binary_function_impl<R (*)(T0)>
|
struct is_unary_or_binary_function_impl<R (*)(T0)>
|
||||||
{ static const bool value = true; };
|
{ static const bool value = true; };
|
||||||
@@ -185,24 +182,16 @@ template <typename R, class T0>
|
|||||||
struct is_unary_or_binary_function_impl<R (*)(T0...)>
|
struct is_unary_or_binary_function_impl<R (*)(T0...)>
|
||||||
{ static const bool value = true; };
|
{ static const bool value = true; };
|
||||||
|
|
||||||
#ifdef BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
|
#else // BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
|
||||||
|
|
||||||
template <typename R, class T0>
|
template <typename R, class T0>
|
||||||
struct is_unary_or_binary_function_impl<R (__stdcall*)(T0)>
|
struct is_unary_or_binary_function_impl<R (__stdcall*)(T0)>
|
||||||
{ static const bool value = true; };
|
{ static const bool value = true; };
|
||||||
/*
|
|
||||||
template <typename R, class T0>
|
|
||||||
struct is_unary_or_binary_function_impl<R (__stdcall*)(T0...)>
|
|
||||||
{ static const bool value = true; };
|
|
||||||
|
|
||||||
template <typename R, class T0>
|
template <typename R, class T0>
|
||||||
struct is_unary_or_binary_function_impl<R (__fastcall*)(T0)>
|
struct is_unary_or_binary_function_impl<R (__fastcall*)(T0)>
|
||||||
{ static const bool value = true; };
|
{ static const bool value = true; };
|
||||||
|
|
||||||
template <typename R, class T0>
|
|
||||||
struct is_unary_or_binary_function_impl<R (__fastcall*)(T0...)>
|
|
||||||
{ static const bool value = true; };
|
|
||||||
|
|
||||||
template <typename R, class T0>
|
template <typename R, class T0>
|
||||||
struct is_unary_or_binary_function_impl<R (__cdecl*)(T0)>
|
struct is_unary_or_binary_function_impl<R (__cdecl*)(T0)>
|
||||||
{ static const bool value = true; };
|
{ static const bool value = true; };
|
||||||
@@ -210,9 +199,13 @@ struct is_unary_or_binary_function_impl<R (__cdecl*)(T0)>
|
|||||||
template <typename R, class T0>
|
template <typename R, class T0>
|
||||||
struct is_unary_or_binary_function_impl<R (__cdecl*)(T0...)>
|
struct is_unary_or_binary_function_impl<R (__cdecl*)(T0...)>
|
||||||
{ static const bool value = true; };
|
{ static const bool value = true; };
|
||||||
*/
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// see boost ticket #4094
|
||||||
|
// avoid duplicate definitions of is_unary_or_binary_function_impl
|
||||||
|
#ifndef BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
|
||||||
|
|
||||||
template <typename R, class T0, class T1>
|
template <typename R, class T0, class T1>
|
||||||
struct is_unary_or_binary_function_impl<R (*)(T0, T1)>
|
struct is_unary_or_binary_function_impl<R (*)(T0, T1)>
|
||||||
{ static const bool value = true; };
|
{ static const bool value = true; };
|
||||||
@@ -220,25 +213,17 @@ struct is_unary_or_binary_function_impl<R (*)(T0, T1)>
|
|||||||
template <typename R, class T0, class T1>
|
template <typename R, class T0, class T1>
|
||||||
struct is_unary_or_binary_function_impl<R (*)(T0, T1...)>
|
struct is_unary_or_binary_function_impl<R (*)(T0, T1...)>
|
||||||
{ static const bool value = true; };
|
{ static const bool value = true; };
|
||||||
/*
|
|
||||||
#ifdef BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
|
#else // BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
|
||||||
|
|
||||||
template <typename R, class T0, class T1>
|
template <typename R, class T0, class T1>
|
||||||
struct is_unary_or_binary_function_impl<R (__stdcall*)(T0, T1)>
|
struct is_unary_or_binary_function_impl<R (__stdcall*)(T0, T1)>
|
||||||
{ static const bool value = true; };
|
{ static const bool value = true; };
|
||||||
|
|
||||||
template <typename R, class T0, class T1>
|
|
||||||
struct is_unary_or_binary_function_impl<R (__stdcall*)(T0, T1...)>
|
|
||||||
{ static const bool value = true; };
|
|
||||||
|
|
||||||
template <typename R, class T0, class T1>
|
template <typename R, class T0, class T1>
|
||||||
struct is_unary_or_binary_function_impl<R (__fastcall*)(T0, T1)>
|
struct is_unary_or_binary_function_impl<R (__fastcall*)(T0, T1)>
|
||||||
{ static const bool value = true; };
|
{ static const bool value = true; };
|
||||||
|
|
||||||
template <typename R, class T0, class T1>
|
|
||||||
struct is_unary_or_binary_function_impl<R (__fastcall*)(T0, T1...)>
|
|
||||||
{ static const bool value = true; };
|
|
||||||
|
|
||||||
template <typename R, class T0, class T1>
|
template <typename R, class T0, class T1>
|
||||||
struct is_unary_or_binary_function_impl<R (__cdecl*)(T0, T1)>
|
struct is_unary_or_binary_function_impl<R (__cdecl*)(T0, T1)>
|
||||||
{ static const bool value = true; };
|
{ static const bool value = true; };
|
||||||
@@ -247,7 +232,7 @@ template <typename R, class T0, class T1>
|
|||||||
struct is_unary_or_binary_function_impl<R (__cdecl*)(T0, T1...)>
|
struct is_unary_or_binary_function_impl<R (__cdecl*)(T0, T1...)>
|
||||||
{ static const bool value = true; };
|
{ static const bool value = true; };
|
||||||
#endif
|
#endif
|
||||||
*/
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct is_unary_or_binary_function_impl<T&>
|
struct is_unary_or_binary_function_impl<T&>
|
||||||
{ static const bool value = false; };
|
{ static const bool value = false; };
|
||||||
|
@@ -37,6 +37,7 @@
|
|||||||
#include <boost/intrusive/unordered_set_hook.hpp>
|
#include <boost/intrusive/unordered_set_hook.hpp>
|
||||||
#include <boost/intrusive/slist.hpp>
|
#include <boost/intrusive/slist.hpp>
|
||||||
#include <boost/intrusive/detail/mpl.hpp>
|
#include <boost/intrusive/detail/mpl.hpp>
|
||||||
|
#include <boost/type_traits.hpp>
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
namespace intrusive {
|
namespace intrusive {
|
||||||
@@ -123,7 +124,7 @@ struct get_slist_impl
|
|||||||
< typename NodeTraits::node
|
< typename NodeTraits::node
|
||||||
, boost::intrusive::value_traits<trivial_traits>
|
, boost::intrusive::value_traits<trivial_traits>
|
||||||
, boost::intrusive::constant_time_size<false>
|
, boost::intrusive::constant_time_size<false>
|
||||||
, boost::intrusive::size_type<std::size_t>
|
, boost::intrusive::size_type<typename boost::make_unsigned<typename std::iterator_traits<typename NodeTraits::node_ptr>::difference_type>::type>
|
||||||
>::type
|
>::type
|
||||||
{};
|
{};
|
||||||
};
|
};
|
||||||
@@ -1677,7 +1678,8 @@ class hashtable_impl
|
|||||||
//! <b>Throws</b>: If the internal hash function throws.
|
//! <b>Throws</b>: If the internal hash function throws.
|
||||||
const_iterator iterator_to(const_reference value) const
|
const_iterator iterator_to(const_reference value) const
|
||||||
{
|
{
|
||||||
return const_iterator(bucket_type::s_iterator_to(priv_value_to_node(const_cast<reference>(value))), this);
|
siterator sit = bucket_type::s_iterator_to(const_cast<node &>(this->priv_value_to_node(value)));
|
||||||
|
return const_iterator(sit, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
//! <b>Requires</b>: value must be an lvalue and shall be in a unordered_set of
|
//! <b>Requires</b>: value must be an lvalue and shall be in a unordered_set of
|
||||||
@@ -2147,7 +2149,7 @@ class hashtable_impl
|
|||||||
{
|
{
|
||||||
const std::size_t *primes = &detail::prime_list_holder<0>::prime_list[0];
|
const std::size_t *primes = &detail::prime_list_holder<0>::prime_list[0];
|
||||||
const std::size_t *primes_end = primes + detail::prime_list_holder<0>::prime_list_size;
|
const std::size_t *primes_end = primes + detail::prime_list_holder<0>::prime_list_size;
|
||||||
size_type const* bound = std::lower_bound(primes, primes_end, n);
|
std::size_t const* bound = std::lower_bound(primes, primes_end, n);
|
||||||
if(bound == primes_end)
|
if(bound == primes_end)
|
||||||
--bound;
|
--bound;
|
||||||
return size_type(*bound);
|
return size_type(*bound);
|
||||||
|
@@ -775,7 +775,7 @@ template<class Prev, class ...Others>
|
|||||||
struct do_pack<typelist<Prev, Others...> >
|
struct do_pack<typelist<Prev, Others...> >
|
||||||
{
|
{
|
||||||
typedef typename Prev::template pack
|
typedef typename Prev::template pack
|
||||||
<typename do_pack<typelist<Others...>>::type> type;
|
<typename do_pack<typelist<Others...> >::type> type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1286,6 +1286,8 @@ class rbtree_impl
|
|||||||
node_algorithms::replace_node( get_real_value_traits().to_node_ptr(*replace_this)
|
node_algorithms::replace_node( get_real_value_traits().to_node_ptr(*replace_this)
|
||||||
, node_ptr(&priv_header())
|
, node_ptr(&priv_header())
|
||||||
, get_real_value_traits().to_node_ptr(with_this));
|
, get_real_value_traits().to_node_ptr(with_this));
|
||||||
|
if(safemode_or_autounlink)
|
||||||
|
node_algorithms::init(replace_this.pointed_node());
|
||||||
}
|
}
|
||||||
|
|
||||||
//! <b>Requires</b>: value must be an lvalue and shall be in a set of
|
//! <b>Requires</b>: value must be an lvalue and shall be in a set of
|
||||||
|
@@ -1453,6 +1453,8 @@ class sgtree_impl
|
|||||||
node_algorithms::replace_node( get_real_value_traits().to_node_ptr(*replace_this)
|
node_algorithms::replace_node( get_real_value_traits().to_node_ptr(*replace_this)
|
||||||
, node_ptr(&priv_header())
|
, node_ptr(&priv_header())
|
||||||
, get_real_value_traits().to_node_ptr(with_this));
|
, get_real_value_traits().to_node_ptr(with_this));
|
||||||
|
if(safemode_or_autounlink)
|
||||||
|
node_algorithms::init(replace_this.pointed_node());
|
||||||
}
|
}
|
||||||
|
|
||||||
//! <b>Requires</b>: value must be an lvalue and shall be in a set of
|
//! <b>Requires</b>: value must be an lvalue and shall be in a set of
|
||||||
|
@@ -1261,6 +1261,8 @@ class splaytree_impl
|
|||||||
node_algorithms::replace_node( get_real_value_traits().to_node_ptr(*replace_this)
|
node_algorithms::replace_node( get_real_value_traits().to_node_ptr(*replace_this)
|
||||||
, node_ptr(&priv_header())
|
, node_ptr(&priv_header())
|
||||||
, get_real_value_traits().to_node_ptr(with_this));
|
, get_real_value_traits().to_node_ptr(with_this));
|
||||||
|
if(safemode_or_autounlink)
|
||||||
|
node_algorithms::init(replace_this.pointed_node());
|
||||||
}
|
}
|
||||||
|
|
||||||
//! <b>Requires</b>: value must be an lvalue and shall be in a set of
|
//! <b>Requires</b>: value must be an lvalue and shall be in a set of
|
||||||
|
@@ -1387,6 +1387,8 @@ class treap_impl
|
|||||||
node_algorithms::replace_node( get_real_value_traits().to_node_ptr(*replace_this)
|
node_algorithms::replace_node( get_real_value_traits().to_node_ptr(*replace_this)
|
||||||
, node_ptr(&priv_header())
|
, node_ptr(&priv_header())
|
||||||
, get_real_value_traits().to_node_ptr(with_this));
|
, get_real_value_traits().to_node_ptr(with_this));
|
||||||
|
if(safemode_or_autounlink)
|
||||||
|
node_algorithms::init(replace_this.pointed_node());
|
||||||
}
|
}
|
||||||
|
|
||||||
//! <b>Requires</b>: value must be an lvalue and shall be in a set of
|
//! <b>Requires</b>: value must be an lvalue and shall be in a set of
|
||||||
|
@@ -39,7 +39,7 @@ namespace intrusive {
|
|||||||
//! The container supports the following options:
|
//! The container supports the following options:
|
||||||
//! \c base_hook<>/member_hook<>/value_traits<>,
|
//! \c base_hook<>/member_hook<>/value_traits<>,
|
||||||
//! \c constant_time_size<>, \c size_type<>, \c hash<> and \c equal<>
|
//! \c constant_time_size<>, \c size_type<>, \c hash<> and \c equal<>
|
||||||
//! \c bucket_traits<>, power_2_buckets<> and cache_begin<>.
|
//! \c bucket_traits<>, \c power_2_buckets<> and \c cache_begin<>.
|
||||||
//!
|
//!
|
||||||
//! unordered_set only provides forward iterators but it provides 4 iterator types:
|
//! unordered_set only provides forward iterators but it provides 4 iterator types:
|
||||||
//! iterator and const_iterator to navigate through the whole container and
|
//! iterator and const_iterator to navigate through the whole container and
|
||||||
@@ -1096,7 +1096,7 @@ class unordered_set
|
|||||||
//! The container supports the following options:
|
//! The container supports the following options:
|
||||||
//! \c base_hook<>/member_hook<>/value_traits<>,
|
//! \c base_hook<>/member_hook<>/value_traits<>,
|
||||||
//! \c constant_time_size<>, \c size_type<>, \c hash<> and \c equal<>
|
//! \c constant_time_size<>, \c size_type<>, \c hash<> and \c equal<>
|
||||||
//! \c bucket_traits<>, power_2_buckets<> and cache_begin<>.
|
//! \c bucket_traits<>, \c power_2_buckets<> and \c cache_begin<>.
|
||||||
//!
|
//!
|
||||||
//! unordered_multiset only provides forward iterators but it provides 4 iterator types:
|
//! unordered_multiset only provides forward iterators but it provides 4 iterator types:
|
||||||
//! iterator and const_iterator to navigate through the whole container and
|
//! iterator and const_iterator to navigate through the whole container and
|
||||||
|
Reference in New Issue
Block a user