mirror of
https://github.com/boostorg/intrusive.git
synced 2025-05-09 23:03:56 +00:00
Use BOOST_INTRUSIVE_STATIC_ASSERT instead of BOOST_STATIC_ASSERT to reduce library level and weight.
This commit is contained in:
parent
60def75ac2
commit
e84e9b7b2e
@ -10,8 +10,6 @@
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//[doc_map_code
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/intrusive/set.hpp>
|
||||
#include <boost/intrusive/unordered_set.hpp>
|
||||
#include <vector>
|
||||
@ -50,9 +48,6 @@ typedef unordered_set< MyClass, key_of_value<first_int_is_key> > UnorderedMap;
|
||||
|
||||
int main()
|
||||
{
|
||||
BOOST_STATIC_ASSERT((boost::is_same< OrderedMap::key_type, int>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<UnorderedMap::key_type, int>::value));
|
||||
|
||||
//Create several MyClass objects, each one with a different value
|
||||
//and insert them into the omap
|
||||
std::vector<MyClass> values;
|
||||
|
@ -17,7 +17,6 @@
|
||||
#include <boost/intrusive/avltree.hpp>
|
||||
#include <boost/intrusive/detail/mpl.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
@ -523,7 +522,7 @@ class avl_set
|
||||
typedef typename Base::const_iterator const_iterator;
|
||||
|
||||
//Assert if passed value traits are compatible with the type
|
||||
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
|
||||
inline avl_set()
|
||||
: Base()
|
||||
@ -1018,7 +1017,7 @@ class avl_multiset
|
||||
typedef typename Base::const_iterator const_iterator;
|
||||
|
||||
//Assert if passed value traits are compatible with the type
|
||||
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
|
||||
inline avl_multiset()
|
||||
: Base()
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include <boost/intrusive/detail/minimal_less_equal_header.hpp>
|
||||
#include <boost/intrusive/detail/minimal_pair_header.hpp>
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/intrusive/avl_set_hook.hpp>
|
||||
#include <boost/intrusive/detail/avltree_node.hpp>
|
||||
#include <boost/intrusive/bstree.hpp>
|
||||
@ -533,7 +532,7 @@ class avltree
|
||||
typedef typename Base::const_reverse_iterator const_reverse_iterator;
|
||||
|
||||
//Assert if passed value traits are compatible with the type
|
||||
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
|
||||
inline avltree()
|
||||
: Base()
|
||||
|
@ -17,7 +17,6 @@
|
||||
#include <boost/intrusive/detail/mpl.hpp>
|
||||
#include <boost/intrusive/bstree.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
@ -520,7 +519,7 @@ class bs_set
|
||||
typedef typename Base::const_iterator const_iterator;
|
||||
|
||||
//Assert if passed value traits are compatible with the type
|
||||
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
|
||||
inline bs_set()
|
||||
: Base()
|
||||
@ -1014,7 +1013,7 @@ class bs_multiset
|
||||
typedef typename Base::const_iterator const_iterator;
|
||||
|
||||
//Assert if passed value traits are compatible with the type
|
||||
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
|
||||
inline bs_multiset()
|
||||
: Base()
|
||||
|
@ -16,7 +16,6 @@
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
|
||||
#include <boost/intrusive/detail/assert.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <boost/intrusive/bs_set_hook.hpp>
|
||||
#include <boost/intrusive/detail/tree_node.hpp>
|
||||
@ -113,7 +112,7 @@ struct bstbase3
|
||||
|
||||
static bstbase3 &get_tree_base_from_end_iterator(const const_iterator &end_iterator)
|
||||
{
|
||||
BOOST_STATIC_ASSERT(has_container_from_iterator);
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(has_container_from_iterator);
|
||||
node_ptr p = end_iterator.pointed_node();
|
||||
header_holder_type* h = header_holder_type::get_holder(p);
|
||||
holder_t *holder = get_parent_from_member<holder_t, header_holder_type>(h, &holder_t::root);
|
||||
@ -207,13 +206,13 @@ struct bstbase3
|
||||
|
||||
static iterator s_iterator_to(reference value) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_STATIC_ASSERT((!stateful_value_traits));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!stateful_value_traits));
|
||||
return iterator (value_traits::to_node_ptr(value), const_value_traits_ptr());
|
||||
}
|
||||
|
||||
static const_iterator s_iterator_to(const_reference value) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_STATIC_ASSERT((!stateful_value_traits));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!stateful_value_traits));
|
||||
return const_iterator (value_traits::to_node_ptr(*pointer_traits<pointer>::const_cast_from(pointer_traits<const_pointer>::pointer_to(value))), const_value_traits_ptr());
|
||||
}
|
||||
|
||||
@ -666,7 +665,7 @@ class bstree_impl
|
||||
static const bool safemode_or_autounlink = is_safe_autounlink<value_traits::link_mode>::value;
|
||||
|
||||
//Constant-time size is incompatible with auto-unlink hooks!
|
||||
BOOST_STATIC_ASSERT(!(constant_time_size && ((int)value_traits::link_mode == (int)auto_unlink)));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(!(constant_time_size && ((int)value_traits::link_mode == (int)auto_unlink)));
|
||||
|
||||
|
||||
protected:
|
||||
@ -1961,7 +1960,7 @@ class bstree_impl
|
||||
//! functor a compilation error will be issued.
|
||||
static void remove_node(reference value) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_STATIC_ASSERT((!constant_time_size));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!constant_time_size));
|
||||
node_ptr to_remove(value_traits::to_node_ptr(value));
|
||||
node_algorithms::unlink(to_remove);
|
||||
BOOST_IF_CONSTEXPR(safemode_or_autounlink)
|
||||
@ -2184,7 +2183,7 @@ class bstree
|
||||
typedef typename Base::const_iterator const_iterator;
|
||||
|
||||
//Assert if passed value traits are compatible with the type
|
||||
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
|
||||
inline bstree()
|
||||
: Base()
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include <boost/intrusive/detail/assert.hpp>
|
||||
#include <boost/intrusive/detail/node_holder.hpp>
|
||||
#include <boost/intrusive/detail/algo_type.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
@ -202,13 +201,13 @@ class generic_hook
|
||||
inline bool is_linked() const BOOST_NOEXCEPT
|
||||
{
|
||||
//is_linked() can be only used in safe-mode or auto-unlink
|
||||
BOOST_STATIC_ASSERT(( hooktags::safemode_or_autounlink ));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( hooktags::safemode_or_autounlink ));
|
||||
return !node_algorithms::unique(this->this_ptr());
|
||||
}
|
||||
|
||||
inline void unlink() BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_STATIC_ASSERT(( (int)hooktags::link_mode == (int)auto_unlink ));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( (int)hooktags::link_mode == (int)auto_unlink ));
|
||||
node_ptr n(this->this_ptr());
|
||||
if(!node_algorithms::inited(n)){
|
||||
node_algorithms::unlink(n);
|
||||
|
@ -26,8 +26,7 @@
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#define BOOST_INTRUSIVE_MSVC_ABI_PTR_TO_MEMBER
|
||||
#include <boost/static_assert.hpp>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
@ -49,7 +48,7 @@ BOOST_INTRUSIVE_FORCEINLINE std::ptrdiff_t offset_from_pointer_to_member(const M
|
||||
//MSVC ABI can use up to 3 int32 to represent pointer to member data
|
||||
//with virtual base classes, in those cases there is no simple to
|
||||
//obtain the address of the parent. So static assert to avoid runtime errors
|
||||
BOOST_STATIC_ASSERT( sizeof(caster) == sizeof(int) );
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT( sizeof(caster) == sizeof(int) );
|
||||
|
||||
caster.ptr_to_member = ptr_to_member;
|
||||
return std::ptrdiff_t(caster.offset);
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include <boost/intrusive/detail/std_fwd.hpp>
|
||||
#include <boost/intrusive/detail/iiterator.hpp>
|
||||
#include <boost/intrusive/detail/mpl.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
@ -72,7 +71,7 @@ class slist_iterator
|
||||
|
||||
inline explicit slist_iterator(node_ptr nodeptr)
|
||||
: members_(nodeptr, const_value_traits_ptr())
|
||||
{ BOOST_STATIC_ASSERT((stateful_value_traits == false)); }
|
||||
{ BOOST_INTRUSIVE_STATIC_ASSERT((stateful_value_traits == false)); }
|
||||
|
||||
inline slist_iterator(const slist_iterator &other)
|
||||
: members_(other.pointed_node(), other.get_value_traits())
|
||||
|
@ -84,4 +84,32 @@
|
||||
# define BOOST_INTRUSIVE_CATCH_END }
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_NO_CXX11_STATIC_ASSERT
|
||||
# ifndef BOOST_NO_CXX11_VARIADIC_MACROS
|
||||
# define BOOST_INTRUSIVE_STATIC_ASSERT( ... ) static_assert(__VA_ARGS__, #__VA_ARGS__)
|
||||
# else
|
||||
# define BOOST_INTRUSIVE_STATIC_ASSERT( B ) static_assert(B, #B)
|
||||
# endif
|
||||
#else
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
namespace detail {
|
||||
|
||||
template<bool B>
|
||||
struct STATIC_ASSERTION_FAILURE;
|
||||
|
||||
template<>
|
||||
struct STATIC_ASSERTION_FAILURE<true>{};
|
||||
|
||||
template<unsigned> struct static_assert_test {};
|
||||
|
||||
}}}
|
||||
|
||||
#define BOOST_INTRUSIVE_STATIC_ASSERT(B) \
|
||||
typedef ::boost::intrusive::detail::static_assert_test<\
|
||||
(unsigned)sizeof(::boost::intrusive::detail::STATIC_ASSERTION_FAILURE<bool(B)>)>\
|
||||
BOOST_JOIN(boost_static_assert_typedef_, __LINE__) BOOST_ATTRIBUTE_UNUSED
|
||||
|
||||
#endif
|
||||
|
||||
#endif //#ifndef BOOST_INTRUSIVE_DETAIL_WORKAROUND_HPP
|
||||
|
@ -60,7 +60,6 @@
|
||||
|
||||
//boost
|
||||
#include <boost/intrusive/detail/assert.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
#include <boost/move/adl_move_swap.hpp>
|
||||
#include <boost/move/algo/detail/search.hpp>
|
||||
@ -2059,14 +2058,14 @@ struct hashdata_internal
|
||||
|
||||
static local_iterator s_local_iterator_to(reference value) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_STATIC_ASSERT((!stateful_value_traits));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!stateful_value_traits));
|
||||
siterator sit(value_traits::to_node_ptr(value));
|
||||
return local_iterator(sit, const_value_traits_ptr());
|
||||
}
|
||||
|
||||
static const_local_iterator s_local_iterator_to(const_reference value) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_STATIC_ASSERT((!stateful_value_traits));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!stateful_value_traits));
|
||||
siterator const sit = siterator
|
||||
( pointer_traits<node_ptr>::const_cast_from
|
||||
(value_traits::to_node_ptr(value))
|
||||
@ -2329,11 +2328,11 @@ class hashtable_impl
|
||||
|
||||
//Configuration error: compare_hash<> can't be specified without store_hash<>
|
||||
//See documentation for more explanations
|
||||
BOOST_STATIC_ASSERT((!compare_hash || store_hash));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!compare_hash || store_hash));
|
||||
|
||||
//Configuration error: fasmod_buckets<> can't be specified with incremental<> or power_2_buckets<>
|
||||
//See documentation for more explanations
|
||||
BOOST_STATIC_ASSERT(!(fastmod_buckets && power_2_buckets));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(!(fastmod_buckets && power_2_buckets));
|
||||
|
||||
typedef typename internal_type::slist_node_ptr slist_node_ptr;
|
||||
typedef typename pointer_traits
|
||||
@ -2360,9 +2359,9 @@ class hashtable_impl
|
||||
static const bool safemode_or_autounlink = internal_type::safemode_or_autounlink;
|
||||
|
||||
//Constant-time size is incompatible with auto-unlink hooks!
|
||||
BOOST_STATIC_ASSERT(!(constant_time_size && ((int)value_traits::link_mode == (int)auto_unlink)));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(!(constant_time_size && ((int)value_traits::link_mode == (int)auto_unlink)));
|
||||
//Cache begin is incompatible with auto-unlink hooks!
|
||||
BOOST_STATIC_ASSERT(!(cache_begin && ((int)value_traits::link_mode == (int)auto_unlink)));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(!(cache_begin && ((int)value_traits::link_mode == (int)auto_unlink)));
|
||||
|
||||
|
||||
/// @endcond
|
||||
@ -3571,7 +3570,7 @@ class hashtable_impl
|
||||
bool incremental_rehash(bool grow = true)
|
||||
{
|
||||
//This function is only available for containers with incremental hashing
|
||||
BOOST_STATIC_ASSERT(( incremental && power_2_buckets ));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( incremental && power_2_buckets ));
|
||||
const std::size_t split_idx = this->split_count();
|
||||
const std::size_t bucket_cnt = this->bucket_count();
|
||||
bool ret = false;
|
||||
@ -3636,7 +3635,7 @@ class hashtable_impl
|
||||
bool incremental_rehash(const bucket_traits &new_bucket_traits) BOOST_NOEXCEPT
|
||||
{
|
||||
//This function is only available for containers with incremental hashing
|
||||
BOOST_STATIC_ASSERT(( incremental && power_2_buckets ));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( incremental && power_2_buckets ));
|
||||
const bucket_ptr new_buckets = new_bucket_traits.bucket_begin();
|
||||
const size_type new_bucket_count_stdszt = static_cast<SizeType>(new_bucket_traits.bucket_count() - bucket_overhead);
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(sizeof(size_type) >= sizeof(std::size_t) || new_bucket_count_stdszt <= size_type(-1));
|
||||
@ -4334,7 +4333,7 @@ class hashtable
|
||||
typedef typename Base::key_equal key_equal;
|
||||
|
||||
//Assert if passed value traits are compatible with the type
|
||||
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
|
||||
inline explicit hashtable ( const bucket_traits &b_traits
|
||||
, const hasher & hash_func = hasher()
|
||||
|
@ -37,7 +37,6 @@
|
||||
#include <boost/intrusive/detail/algorithm.hpp>
|
||||
|
||||
#include <boost/move/utility_core.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
#include <boost/intrusive/detail/value_functors.hpp>
|
||||
#include <cstddef> //std::size_t, etc.
|
||||
@ -123,7 +122,7 @@ class list_impl
|
||||
static const bool safemode_or_autounlink = is_safe_autounlink<value_traits::link_mode>::value;
|
||||
|
||||
//Constant-time size is incompatible with auto-unlink hooks!
|
||||
BOOST_STATIC_ASSERT(!(constant_time_size &&
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(!(constant_time_size &&
|
||||
((int)value_traits::link_mode == (int)auto_unlink)
|
||||
));
|
||||
|
||||
@ -1272,7 +1271,7 @@ class list_impl
|
||||
//! is stateless.
|
||||
static iterator s_iterator_to(reference value) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_STATIC_ASSERT((!stateful_value_traits));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!stateful_value_traits));
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(!node_algorithms::inited(value_traits::to_node_ptr(value)));
|
||||
return iterator(value_traits::to_node_ptr(value), const_value_traits_ptr());
|
||||
}
|
||||
@ -1290,7 +1289,7 @@ class list_impl
|
||||
//! is stateless.
|
||||
static const_iterator s_iterator_to(const_reference value) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_STATIC_ASSERT((!stateful_value_traits));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!stateful_value_traits));
|
||||
reference r =*detail::uncast(pointer_traits<const_pointer>::pointer_to(value));
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(!node_algorithms::inited(value_traits::to_node_ptr(r)));
|
||||
return const_iterator(value_traits::to_node_ptr(r), const_value_traits_ptr());
|
||||
@ -1394,7 +1393,7 @@ class list_impl
|
||||
private:
|
||||
static list_impl &priv_container_from_end_iterator(const const_iterator &end_iterator) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_STATIC_ASSERT((has_container_from_iterator));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((has_container_from_iterator));
|
||||
node_ptr p = end_iterator.pointed_node();
|
||||
header_holder_type* h = header_holder_type::get_holder(p);
|
||||
root_plus_size* r = detail::parent_from_member
|
||||
@ -1466,7 +1465,7 @@ class list
|
||||
#endif
|
||||
>::type Base;
|
||||
//Assert if passed value traits are compatible with the type
|
||||
BOOST_STATIC_ASSERT((detail::is_same<typename Base::value_traits::value_type, T>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<typename Base::value_traits::value_type, T>::value));
|
||||
BOOST_MOVABLE_BUT_NOT_COPYABLE(list)
|
||||
|
||||
public:
|
||||
|
@ -14,7 +14,7 @@
|
||||
#define BOOST_INTRUSIVE_PACK_OPTIONS_HPP
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
|
||||
#include <boost/intrusive/detail/workaround.hpp>
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
@ -338,7 +338,7 @@ struct pack_options
|
||||
//!
|
||||
//! typedef pack_options< empty_default, typename my_pointer<void*> >::type::my_pointer_type type;
|
||||
//!
|
||||
//! BOOST_STATIC_ASSERT(( boost::is_same<type, void>::value ));
|
||||
//! BOOST_INTRUSIVE_STATIC_ASSERT(( boost::is_same<type, void>::value ));
|
||||
//!
|
||||
//! \endcode
|
||||
#define BOOST_INTRUSIVE_OPTION_TYPE(OPTION_NAME, TYPE, TYPEDEF_EXPR, TYPEDEF_NAME)
|
||||
@ -368,7 +368,7 @@ struct pack_options
|
||||
//!
|
||||
//! const bool is_incremental = pack_options< empty_default, incremental<true> >::type::is_incremental;
|
||||
//!
|
||||
//! BOOST_STATIC_ASSERT(( is_incremental == true ));
|
||||
//! BOOST_INTRUSIVE_STATIC_ASSERT(( is_incremental == true ));
|
||||
//!
|
||||
//! \endcode
|
||||
#define BOOST_INTRUSIVE_OPTION_CONSTANT(OPTION_NAME, TYPE, VALUE, CONSTANT_NAME)
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include <boost/intrusive/link_mode.hpp>
|
||||
|
||||
#include <boost/move/utility_core.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
@ -536,7 +535,7 @@ class rbtree
|
||||
typedef typename Base::const_reverse_iterator const_reverse_iterator;
|
||||
|
||||
//Assert if passed value traits are compatible with the type
|
||||
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
|
||||
inline rbtree()
|
||||
: Base()
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include <boost/intrusive/detail/mpl.hpp>
|
||||
#include <boost/intrusive/rbtree.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
@ -523,7 +522,7 @@ class set
|
||||
typedef typename Base::const_iterator const_iterator;
|
||||
|
||||
//Assert if passed value traits are compatible with the type
|
||||
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
|
||||
inline set()
|
||||
: Base()
|
||||
@ -1018,7 +1017,7 @@ class multiset
|
||||
typedef typename Base::const_iterator const_iterator;
|
||||
|
||||
//Assert if passed value traits are compatible with the type
|
||||
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
|
||||
inline multiset()
|
||||
: Base()
|
||||
|
@ -16,7 +16,6 @@
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <boost/intrusive/detail/mpl.hpp>
|
||||
#include <boost/intrusive/sgtree.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
@ -532,7 +531,7 @@ class sg_set
|
||||
typedef typename Base::const_iterator const_iterator;
|
||||
|
||||
//Assert if passed value traits are compatible with the type
|
||||
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
|
||||
inline sg_set()
|
||||
: Base()
|
||||
@ -1039,7 +1038,7 @@ class sg_multiset
|
||||
typedef typename Base::const_iterator const_iterator;
|
||||
|
||||
//Assert if passed value traits are compatible with the type
|
||||
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
|
||||
inline sg_multiset()
|
||||
: Base()
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <boost/intrusive/detail/assert.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/intrusive/bs_set_hook.hpp>
|
||||
#include <boost/intrusive/bstree.hpp>
|
||||
#include <boost/intrusive/detail/tree_node.hpp>
|
||||
@ -275,7 +274,7 @@ class sgtree_impl
|
||||
typedef typename alpha_traits::multiply_by_alpha_t multiply_by_alpha_t;
|
||||
|
||||
BOOST_MOVABLE_BUT_NOT_COPYABLE(sgtree_impl)
|
||||
BOOST_STATIC_ASSERT(((int)value_traits::link_mode != (int)auto_unlink));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(((int)value_traits::link_mode != (int)auto_unlink));
|
||||
|
||||
enum { safemode_or_autounlink =
|
||||
(int)value_traits::link_mode == (int)auto_unlink ||
|
||||
@ -914,7 +913,7 @@ class sgtree_impl
|
||||
{
|
||||
//The alpha factor CAN't be changed if the fixed, floating operation-less
|
||||
//1/sqrt(2) alpha factor option is activated
|
||||
BOOST_STATIC_ASSERT((floating_point));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((floating_point));
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT((new_alpha > 0.5f && new_alpha < 1.0f));
|
||||
if(new_alpha >= 0.5f && new_alpha < 1.0f){
|
||||
float old_alpha = this->get_alpha_traits().get_alpha();
|
||||
@ -1018,7 +1017,7 @@ class sgtree
|
||||
typedef typename Base::const_reverse_iterator const_reverse_iterator;
|
||||
|
||||
//Assert if passed value traits are compatible with the type
|
||||
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
|
||||
inline sgtree()
|
||||
: Base()
|
||||
|
@ -41,7 +41,6 @@
|
||||
#include <boost/intrusive/detail/node_cloner_disposer.hpp>
|
||||
|
||||
#include <boost/move/utility_core.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
#include <cstddef> //std::size_t
|
||||
|
||||
@ -166,11 +165,11 @@ class slist_impl
|
||||
static const bool safemode_or_autounlink = is_safe_autounlink<value_traits::link_mode>::value;
|
||||
|
||||
//Constant-time size is incompatible with auto-unlink hooks!
|
||||
BOOST_STATIC_ASSERT(!(constant_time_size && ((int)value_traits::link_mode == (int)auto_unlink)));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(!(constant_time_size && ((int)value_traits::link_mode == (int)auto_unlink)));
|
||||
//Linear singly linked lists are incompatible with auto-unlink hooks!
|
||||
BOOST_STATIC_ASSERT(!(linear && ((int)value_traits::link_mode == (int)auto_unlink)));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(!(linear && ((int)value_traits::link_mode == (int)auto_unlink)));
|
||||
//A list with cached last node is incompatible with auto-unlink hooks!
|
||||
BOOST_STATIC_ASSERT(!(cache_last && ((int)value_traits::link_mode == (int)auto_unlink)));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(!(cache_last && ((int)value_traits::link_mode == (int)auto_unlink)));
|
||||
|
||||
inline node_ptr get_end_node()
|
||||
{ return node_algorithms::end_node(this->get_root_node()); }
|
||||
@ -449,7 +448,7 @@ class slist_impl
|
||||
//! This function is only available is cache_last<> is true.
|
||||
void push_back(reference value) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_STATIC_ASSERT((cache_last));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((cache_last));
|
||||
node_ptr n = priv_value_traits().to_node_ptr(value);
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::inited(n));
|
||||
node_algorithms::link_after(this->get_last_node(), n);
|
||||
@ -522,7 +521,7 @@ class slist_impl
|
||||
//! This function is only available is cache_last<> is true.
|
||||
reference back() BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_STATIC_ASSERT((cache_last));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((cache_last));
|
||||
return *this->priv_value_traits().to_value_ptr(this->get_last_node());
|
||||
}
|
||||
|
||||
@ -536,7 +535,7 @@ class slist_impl
|
||||
//! This function is only available is cache_last<> is true.
|
||||
inline const_reference back() const BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_STATIC_ASSERT((cache_last));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((cache_last));
|
||||
return *this->priv_value_traits().to_value_ptr(this->get_last_node());
|
||||
}
|
||||
|
||||
@ -1061,7 +1060,7 @@ class slist_impl
|
||||
|
||||
static iterator s_insert_after(const_iterator const prev_p, reference value) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_STATIC_ASSERT(((!cache_last)&&(!constant_time_size)&&(!stateful_value_traits)));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(((!cache_last)&&(!constant_time_size)&&(!stateful_value_traits)));
|
||||
node_ptr const n = value_traits::to_node_ptr(value);
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::inited(n));
|
||||
node_algorithms::link_after(prev_p.pointed_node(), n);
|
||||
@ -1071,7 +1070,7 @@ class slist_impl
|
||||
template<class Disposer>
|
||||
static iterator s_erase_after_and_dispose(const_iterator prev, Disposer disposer) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_STATIC_ASSERT(((!cache_last)&&(!constant_time_size)&&(!stateful_value_traits)));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(((!cache_last)&&(!constant_time_size)&&(!stateful_value_traits)));
|
||||
const_iterator it(prev);
|
||||
++it;
|
||||
node_ptr to_erase(it.pointed_node());
|
||||
@ -1087,7 +1086,7 @@ class slist_impl
|
||||
template<class Disposer>
|
||||
static iterator s_erase_after_and_dispose(const_iterator before_f, const_iterator l, Disposer disposer) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_STATIC_ASSERT(((!cache_last)&&(!constant_time_size)&&(!stateful_value_traits)));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(((!cache_last)&&(!constant_time_size)&&(!stateful_value_traits)));
|
||||
node_ptr bfp(before_f.pointed_node()), lp(l.pointed_node());
|
||||
node_ptr fp(node_traits::get_next(bfp));
|
||||
node_algorithms::unlink_after(bfp, lp);
|
||||
@ -1754,7 +1753,7 @@ class slist_impl
|
||||
//! is stateless.
|
||||
static iterator s_iterator_to(reference value) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_STATIC_ASSERT((!stateful_value_traits));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!stateful_value_traits));
|
||||
return iterator (value_traits::to_node_ptr(value), const_value_traits_ptr());
|
||||
}
|
||||
|
||||
@ -1771,7 +1770,7 @@ class slist_impl
|
||||
//! is stateless.
|
||||
static const_iterator s_iterator_to(const_reference value) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_STATIC_ASSERT((!stateful_value_traits));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!stateful_value_traits));
|
||||
reference r =*detail::uncast(pointer_traits<const_pointer>::pointer_to(value));
|
||||
return const_iterator(value_traits::to_node_ptr(r), const_value_traits_ptr());
|
||||
}
|
||||
@ -2112,8 +2111,8 @@ class slist_impl
|
||||
{
|
||||
//Obtaining the container from the end iterator is not possible with linear
|
||||
//singly linked lists (because "end" is represented by the null pointer)
|
||||
BOOST_STATIC_ASSERT(!linear);
|
||||
BOOST_STATIC_ASSERT((has_container_from_iterator));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(!linear);
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((has_container_from_iterator));
|
||||
node_ptr p = end_iterator.pointed_node();
|
||||
header_holder_type* h = header_holder_type::get_holder(p);
|
||||
header_holder_plus_last_t* hpl = detail::parent_from_member< header_holder_plus_last_t, header_holder_type>
|
||||
@ -2185,7 +2184,7 @@ class slist
|
||||
#endif
|
||||
>::type Base;
|
||||
//Assert if passed value traits are compatible with the type
|
||||
BOOST_STATIC_ASSERT((detail::is_same<typename Base::value_traits::value_type, T>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<typename Base::value_traits::value_type, T>::value));
|
||||
BOOST_MOVABLE_BUT_NOT_COPYABLE(slist)
|
||||
|
||||
public:
|
||||
|
@ -17,7 +17,6 @@
|
||||
#include <boost/intrusive/splaytree.hpp>
|
||||
#include <boost/intrusive/detail/mpl.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
@ -544,7 +543,7 @@ class splay_set
|
||||
typedef typename Base::const_iterator const_iterator;
|
||||
|
||||
//Assert if passed value traits are compatible with the type
|
||||
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
|
||||
inline splay_set()
|
||||
: Base()
|
||||
@ -1055,7 +1054,7 @@ class splay_multiset
|
||||
typedef typename Base::const_iterator const_iterator;
|
||||
|
||||
//Assert if passed value traits are compatible with the type
|
||||
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
|
||||
inline splay_multiset()
|
||||
: Base()
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include <boost/intrusive/detail/minimal_less_equal_header.hpp>
|
||||
#include <boost/intrusive/detail/minimal_pair_header.hpp> //std::pair
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/intrusive/bstree.hpp>
|
||||
#include <boost/intrusive/detail/tree_node.hpp>
|
||||
#include <boost/intrusive/detail/mpl.hpp>
|
||||
@ -611,7 +610,7 @@ class splaytree
|
||||
typedef typename Base::const_reverse_iterator const_reverse_iterator;
|
||||
|
||||
//Assert if passed value traits are compatible with the type
|
||||
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
|
||||
inline splaytree()
|
||||
: Base()
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include <boost/intrusive/detail/node_cloner_disposer.hpp>
|
||||
#include <boost/intrusive/detail/key_nodeptr_comp.hpp>
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
#include <boost/move/adl_move_swap.hpp>
|
||||
|
||||
@ -1313,7 +1312,7 @@ class treap
|
||||
typedef typename Base::const_reverse_iterator const_reverse_iterator;
|
||||
|
||||
//Assert if passed value traits are compatible with the type
|
||||
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
|
||||
inline treap()
|
||||
: Base()
|
||||
|
@ -17,7 +17,6 @@
|
||||
#include <boost/intrusive/treap.hpp>
|
||||
#include <boost/intrusive/detail/mpl.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
@ -540,7 +539,7 @@ class treap_set
|
||||
typedef typename Base::const_iterator const_iterator;
|
||||
|
||||
//Assert if passed value traits are compatible with the type
|
||||
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
|
||||
inline treap_set()
|
||||
: Base()
|
||||
@ -1055,7 +1054,7 @@ class treap_multiset
|
||||
typedef typename Base::const_iterator const_iterator;
|
||||
|
||||
//Assert if passed value traits are compatible with the type
|
||||
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
|
||||
|
||||
inline treap_multiset()
|
||||
: Base()
|
||||
|
@ -17,7 +17,6 @@
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <boost/intrusive/hashtable.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
@ -488,7 +487,7 @@ class unordered_set
|
||||
>::type Base;
|
||||
|
||||
//Assert if passed value traits are compatible with the type
|
||||
BOOST_STATIC_ASSERT((detail::is_same<typename Base::value_traits::value_type, T>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<typename Base::value_traits::value_type, T>::value));
|
||||
BOOST_MOVABLE_BUT_NOT_COPYABLE(unordered_set)
|
||||
|
||||
public:
|
||||
@ -943,7 +942,7 @@ class unordered_multiset
|
||||
#endif
|
||||
>::type Base;
|
||||
//Assert if passed value traits are compatible with the type
|
||||
BOOST_STATIC_ASSERT((detail::is_same<typename Base::value_traits::value_type, T>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<typename Base::value_traits::value_type, T>::value));
|
||||
BOOST_MOVABLE_BUT_NOT_COPYABLE(unordered_multiset)
|
||||
|
||||
public:
|
||||
|
@ -39,7 +39,7 @@ struct rebinder
|
||||
, Option1
|
||||
, Option2
|
||||
> type;
|
||||
BOOST_STATIC_ASSERT((key_type_tester<typename common_t::key_of_value_opt, type>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((key_type_tester<typename common_t::key_of_value_opt, type>::value));
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -39,7 +39,7 @@ struct rebinder
|
||||
, Option1
|
||||
, Option2
|
||||
> type;
|
||||
BOOST_STATIC_ASSERT((key_type_tester<typename common_t::key_of_value_opt, type>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((key_type_tester<typename common_t::key_of_value_opt, type>::value));
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -38,7 +38,7 @@ struct rebinder
|
||||
, Option1
|
||||
, Option2
|
||||
> type;
|
||||
BOOST_STATIC_ASSERT((key_type_tester<typename common_t::key_of_value_opt, type>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((key_type_tester<typename common_t::key_of_value_opt, type>::value));
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -38,7 +38,7 @@ struct rebinder
|
||||
, Option1
|
||||
, Option2
|
||||
> type;
|
||||
BOOST_STATIC_ASSERT((key_type_tester<typename common_t::key_of_value_opt, type>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((key_type_tester<typename common_t::key_of_value_opt, type>::value));
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -30,7 +30,7 @@ class delete_disposer
|
||||
void operator()(Pointer p)
|
||||
{
|
||||
typedef typename boost::intrusive::iterator_traits<Pointer>::value_type value_type;
|
||||
BOOST_STATIC_ASSERT(( detail::is_same<T, value_type>::value ));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( detail::is_same<T, value_type>::value ));
|
||||
delete boost::movelib::to_raw_pointer(p);
|
||||
}
|
||||
};
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include <boost/intrusive/splay_set.hpp>
|
||||
#include <boost/intrusive/treap_set.hpp>
|
||||
#include <boost/intrusive/unordered_set.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include "itestvalue.hpp"
|
||||
|
||||
using namespace boost::intrusive;
|
||||
|
@ -11,7 +11,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#include <boost/intrusive/unordered_set.hpp>
|
||||
#include <boost/intrusive/detail/mpl.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <vector>
|
||||
|
||||
using namespace boost::intrusive;
|
||||
@ -98,14 +97,14 @@ typedef unordered_set
|
||||
|
||||
int main()
|
||||
{
|
||||
BOOST_STATIC_ASSERT((detail::is_same<BaseUset::bucket_type, BaseBucketType>::value));
|
||||
BOOST_STATIC_ASSERT((detail::is_same<MemberUset::bucket_type, MemberBucketType>::value));
|
||||
BOOST_STATIC_ASSERT((detail::is_same<TraitsUset::bucket_type, TraitsBucketType>::value));
|
||||
BOOST_STATIC_ASSERT((detail::is_same<BaseBucketType, MemberBucketType>::value));
|
||||
BOOST_STATIC_ASSERT((detail::is_same<BaseBucketType, TraitsBucketType>::value));
|
||||
BOOST_STATIC_ASSERT((detail::is_same<BaseBucketPtrType, TraitsBucketPtrType>::value));
|
||||
BOOST_STATIC_ASSERT((detail::is_same<BaseBucketPtrType, MemberBucketPtrType>::value));
|
||||
BOOST_STATIC_ASSERT((detail::is_same<BaseBucketPtrType, BaseBucketType*>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<BaseUset::bucket_type, BaseBucketType>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<MemberUset::bucket_type, MemberBucketType>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<TraitsUset::bucket_type, TraitsBucketType>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<BaseBucketType, MemberBucketType>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<BaseBucketType, TraitsBucketType>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<BaseBucketPtrType, TraitsBucketPtrType>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<BaseBucketPtrType, MemberBucketPtrType>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<BaseBucketPtrType, BaseBucketType*>::value));
|
||||
|
||||
typedef std::vector<MyClass>::iterator VectIt;
|
||||
typedef std::vector<MyClass>::reverse_iterator VectRit;
|
||||
|
@ -10,7 +10,6 @@
|
||||
|
||||
#include <boost/intrusive/detail/iterator.hpp>
|
||||
#include <boost/intrusive/detail/mpl.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
namespace boost{ namespace intrusive { namespace test{
|
||||
|
||||
@ -120,8 +119,8 @@ void test_iterator_compatible(C &c)
|
||||
test_iterator_operations(get_reverse_iterator<C>::begin(c), get_reverse_iterator<C>::end(c));
|
||||
test_iterator_operations(get_const_reverse_iterator<C>::begin(c), get_const_reverse_iterator<C>::end(c));
|
||||
//Make sure dangeous conversions are not possible
|
||||
BOOST_STATIC_ASSERT((!boost::intrusive::detail::is_convertible<const_iterator, iterator>::value));
|
||||
BOOST_STATIC_ASSERT((!boost::intrusive::detail::is_convertible<const_reverse_iterator, reverse_iterator>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!boost::intrusive::detail::is_convertible<const_iterator, iterator>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!boost::intrusive::detail::is_convertible<const_reverse_iterator, reverse_iterator>::value));
|
||||
//Test iterator conversions
|
||||
{
|
||||
const_iterator ci;
|
||||
@ -163,34 +162,34 @@ void test_iterator_input_and_compatible(C &c)
|
||||
|
||||
using boost::move_detail::is_same;
|
||||
//Trivial typedefs
|
||||
BOOST_STATIC_ASSERT((!is_same<iterator, const_iterator>::value));
|
||||
BOOST_STATIC_ASSERT((!is_same<reverse_iterator, const_reverse_iterator>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!is_same<iterator, const_iterator>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!is_same<reverse_iterator, const_reverse_iterator>::value));
|
||||
//difference_type
|
||||
typedef typename C::difference_type difference_type;
|
||||
BOOST_STATIC_ASSERT((is_same<difference_type, typename nit_traits::difference_type>::value));
|
||||
BOOST_STATIC_ASSERT((is_same<difference_type, typename cit_traits::difference_type>::value));
|
||||
BOOST_STATIC_ASSERT((is_same<difference_type, typename rnit_traits::difference_type>::value));
|
||||
BOOST_STATIC_ASSERT((is_same<difference_type, typename crit_traits::difference_type>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((is_same<difference_type, typename nit_traits::difference_type>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((is_same<difference_type, typename cit_traits::difference_type>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((is_same<difference_type, typename rnit_traits::difference_type>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((is_same<difference_type, typename crit_traits::difference_type>::value));
|
||||
//value_type
|
||||
typedef typename C::value_type value_type;
|
||||
BOOST_STATIC_ASSERT((is_same<value_type, typename nit_traits::value_type>::value));
|
||||
BOOST_STATIC_ASSERT((is_same<value_type, typename cit_traits::value_type>::value));
|
||||
BOOST_STATIC_ASSERT((is_same<value_type, typename rnit_traits::value_type>::value));
|
||||
BOOST_STATIC_ASSERT((is_same<value_type, typename crit_traits::value_type>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((is_same<value_type, typename nit_traits::value_type>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((is_same<value_type, typename cit_traits::value_type>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((is_same<value_type, typename rnit_traits::value_type>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((is_same<value_type, typename crit_traits::value_type>::value));
|
||||
//pointer
|
||||
typedef typename C::pointer pointer;
|
||||
typedef typename C::const_pointer const_pointer;
|
||||
BOOST_STATIC_ASSERT((is_same<pointer, typename nit_traits::pointer>::value));
|
||||
BOOST_STATIC_ASSERT((is_same<const_pointer, typename cit_traits::pointer>::value));
|
||||
BOOST_STATIC_ASSERT((is_same<pointer, typename rnit_traits::pointer>::value));
|
||||
BOOST_STATIC_ASSERT((is_same<const_pointer, typename crit_traits::pointer>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((is_same<pointer, typename nit_traits::pointer>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((is_same<const_pointer, typename cit_traits::pointer>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((is_same<pointer, typename rnit_traits::pointer>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((is_same<const_pointer, typename crit_traits::pointer>::value));
|
||||
//reference
|
||||
typedef typename C::reference reference;
|
||||
typedef typename C::const_reference const_reference;
|
||||
BOOST_STATIC_ASSERT((is_same<reference, typename nit_traits::reference>::value));
|
||||
BOOST_STATIC_ASSERT((is_same<const_reference, typename cit_traits::reference>::value));
|
||||
BOOST_STATIC_ASSERT((is_same<reference, typename rnit_traits::reference>::value));
|
||||
BOOST_STATIC_ASSERT((is_same<const_reference, typename crit_traits::reference>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((is_same<reference, typename nit_traits::reference>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((is_same<const_reference, typename cit_traits::reference>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((is_same<reference, typename rnit_traits::reference>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((is_same<const_reference, typename crit_traits::reference>::value));
|
||||
//Dynamic tests
|
||||
test_iterator_compatible(c);
|
||||
}
|
||||
@ -321,10 +320,10 @@ void test_iterator_forward(C &c)
|
||||
|
||||
using boost::intrusive::detail::is_same;
|
||||
//iterator_category
|
||||
BOOST_STATIC_ASSERT((is_same<std::forward_iterator_tag, typename nit_traits::iterator_category>::value));
|
||||
BOOST_STATIC_ASSERT((is_same<std::forward_iterator_tag, typename cit_traits::iterator_category>::value));
|
||||
BOOST_STATIC_ASSERT((is_same<std::forward_iterator_tag, typename rnit_traits::iterator_category>::value));
|
||||
BOOST_STATIC_ASSERT((is_same<std::forward_iterator_tag, typename crit_traits::iterator_category>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((is_same<std::forward_iterator_tag, typename nit_traits::iterator_category>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((is_same<std::forward_iterator_tag, typename cit_traits::iterator_category>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((is_same<std::forward_iterator_tag, typename rnit_traits::iterator_category>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((is_same<std::forward_iterator_tag, typename crit_traits::iterator_category>::value));
|
||||
//Test dynamic
|
||||
test_iterator_forward_and_compatible(c);
|
||||
}
|
||||
@ -343,10 +342,10 @@ void test_iterator_bidirectional(C &c)
|
||||
|
||||
using boost::intrusive::detail::is_same;
|
||||
//iterator_category
|
||||
BOOST_STATIC_ASSERT((is_same<std::bidirectional_iterator_tag, typename nit_traits::iterator_category>::value));
|
||||
BOOST_STATIC_ASSERT((is_same<std::bidirectional_iterator_tag, typename cit_traits::iterator_category>::value));
|
||||
BOOST_STATIC_ASSERT((is_same<std::bidirectional_iterator_tag, typename rnit_traits::iterator_category>::value));
|
||||
BOOST_STATIC_ASSERT((is_same<std::bidirectional_iterator_tag, typename crit_traits::iterator_category>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((is_same<std::bidirectional_iterator_tag, typename nit_traits::iterator_category>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((is_same<std::bidirectional_iterator_tag, typename cit_traits::iterator_category>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((is_same<std::bidirectional_iterator_tag, typename rnit_traits::iterator_category>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((is_same<std::bidirectional_iterator_tag, typename crit_traits::iterator_category>::value));
|
||||
//Test dynamic
|
||||
test_iterator_bidirectional_and_compatible(c);
|
||||
}
|
||||
@ -365,10 +364,10 @@ void test_iterator_random(C &c)
|
||||
|
||||
using boost::intrusive::detail::is_same;
|
||||
//iterator_category
|
||||
BOOST_STATIC_ASSERT((is_same<std::random_access_iterator_tag, typename nit_traits::iterator_category>::value));
|
||||
BOOST_STATIC_ASSERT((is_same<std::random_access_iterator_tag, typename cit_traits::iterator_category>::value));
|
||||
BOOST_STATIC_ASSERT((is_same<std::random_access_iterator_tag, typename rnit_traits::iterator_category>::value));
|
||||
BOOST_STATIC_ASSERT((is_same<std::random_access_iterator_tag, typename crit_traits::iterator_category>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((is_same<std::random_access_iterator_tag, typename nit_traits::iterator_category>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((is_same<std::random_access_iterator_tag, typename cit_traits::iterator_category>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((is_same<std::random_access_iterator_tag, typename rnit_traits::iterator_category>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((is_same<std::random_access_iterator_tag, typename crit_traits::iterator_category>::value));
|
||||
//Test dynamic
|
||||
test_iterator_random_and_compatible(c);
|
||||
}
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include <boost/intrusive/treap_set.hpp>
|
||||
#include <boost/intrusive/detail/mpl.hpp>
|
||||
#include <boost/intrusive/pointer_traits.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include "smart_ptr.hpp"
|
||||
#include <vector>
|
||||
|
||||
@ -160,52 +159,52 @@ int main()
|
||||
}
|
||||
|
||||
//Check defined types and implicitly defined types are equal
|
||||
BOOST_STATIC_ASSERT((detail::is_same<make_list_base_hook<void_pointer<void*>, link_mode<safe_link> >::type
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<make_list_base_hook<void_pointer<void*>, link_mode<safe_link> >::type
|
||||
,make_list_base_hook<>::type
|
||||
>::value));
|
||||
|
||||
BOOST_STATIC_ASSERT((detail::is_same<make_slist_base_hook<void_pointer<void*>, link_mode<safe_link> >::type
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<make_slist_base_hook<void_pointer<void*>, link_mode<safe_link> >::type
|
||||
,make_slist_base_hook<>::type
|
||||
>::value));
|
||||
|
||||
BOOST_STATIC_ASSERT((detail::is_same<make_set_base_hook<void_pointer<void*>, link_mode<safe_link> >::type
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<make_set_base_hook<void_pointer<void*>, link_mode<safe_link> >::type
|
||||
,make_set_base_hook<>::type
|
||||
>::value));
|
||||
|
||||
BOOST_STATIC_ASSERT((detail::is_same<make_unordered_set_base_hook<void_pointer<void*>, link_mode<safe_link> >::type
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<make_unordered_set_base_hook<void_pointer<void*>, link_mode<safe_link> >::type
|
||||
,make_unordered_set_base_hook<>::type
|
||||
>::value));
|
||||
|
||||
BOOST_STATIC_ASSERT((detail::is_same<make_avl_set_base_hook<void_pointer<void*>, link_mode<safe_link> >::type
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<make_avl_set_base_hook<void_pointer<void*>, link_mode<safe_link> >::type
|
||||
,make_avl_set_base_hook<>::type
|
||||
>::value));
|
||||
|
||||
BOOST_STATIC_ASSERT((detail::is_same<make_bs_set_base_hook<void_pointer<void*>, link_mode<safe_link> >::type
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same<make_bs_set_base_hook<void_pointer<void*>, link_mode<safe_link> >::type
|
||||
,make_bs_set_base_hook<>::type
|
||||
>::value));
|
||||
|
||||
//Check defined types and implicitly defined types are unequal
|
||||
BOOST_STATIC_ASSERT(!(detail::is_same<make_list_base_hook<void_pointer<void*>, link_mode<normal_link> >::type
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(!(detail::is_same<make_list_base_hook<void_pointer<void*>, link_mode<normal_link> >::type
|
||||
,make_list_base_hook<>::type
|
||||
>::value));
|
||||
|
||||
BOOST_STATIC_ASSERT(!(detail::is_same<make_slist_base_hook<void_pointer<void*>, link_mode<normal_link> >::type
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(!(detail::is_same<make_slist_base_hook<void_pointer<void*>, link_mode<normal_link> >::type
|
||||
,make_slist_base_hook<>::type
|
||||
>::value));
|
||||
|
||||
BOOST_STATIC_ASSERT(!(detail::is_same<make_set_base_hook<void_pointer<void*>, link_mode<normal_link> >::type
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(!(detail::is_same<make_set_base_hook<void_pointer<void*>, link_mode<normal_link> >::type
|
||||
,make_set_base_hook<>::type
|
||||
>::value));
|
||||
|
||||
BOOST_STATIC_ASSERT(!(detail::is_same<make_unordered_set_base_hook<void_pointer<void*>, link_mode<normal_link> >::type
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(!(detail::is_same<make_unordered_set_base_hook<void_pointer<void*>, link_mode<normal_link> >::type
|
||||
,make_unordered_set_base_hook<>::type
|
||||
>::value));
|
||||
|
||||
BOOST_STATIC_ASSERT(!(detail::is_same<make_avl_set_base_hook<void_pointer<void*>, link_mode<normal_link> >::type
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(!(detail::is_same<make_avl_set_base_hook<void_pointer<void*>, link_mode<normal_link> >::type
|
||||
,make_avl_set_base_hook<>::type
|
||||
>::value));
|
||||
|
||||
BOOST_STATIC_ASSERT(!(detail::is_same<make_bs_set_base_hook<void_pointer<void*>, link_mode<normal_link> >::type
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(!(detail::is_same<make_bs_set_base_hook<void_pointer<void*>, link_mode<normal_link> >::type
|
||||
,make_bs_set_base_hook<>::type
|
||||
>::value));
|
||||
|
||||
|
@ -39,7 +39,7 @@ struct rebinder
|
||||
, Option1
|
||||
, Option2
|
||||
> type;
|
||||
BOOST_STATIC_ASSERT((key_type_tester<typename common_t::key_of_value_opt, type>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((key_type_tester<typename common_t::key_of_value_opt, type>::value));
|
||||
};
|
||||
};
|
||||
enum HookType
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
#include <boost/move/detail/to_raw_pointer.hpp>
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
|
||||
namespace boost{
|
||||
@ -88,7 +87,7 @@ struct nonhook_node_member_value_traits
|
||||
|
||||
static const link_mode_type link_mode = Link_Mode;
|
||||
|
||||
BOOST_STATIC_ASSERT((Link_Mode == safe_link || Link_Mode == auto_unlink));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((Link_Mode == safe_link || Link_Mode == auto_unlink));
|
||||
|
||||
static node_ptr to_node_ptr(reference value)
|
||||
{
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/aligned_storage.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <cstring>
|
||||
#include <new>
|
||||
|
||||
@ -42,14 +41,14 @@ static buffer_t buffer_0xFF;
|
||||
template<class Iterator>
|
||||
const Iterator &on_0x00_buffer()
|
||||
{
|
||||
BOOST_STATIC_ASSERT(sizeof(buffer_t) >= sizeof(Iterator));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(sizeof(buffer_t) >= sizeof(Iterator));
|
||||
return * ::new(std::memset(&buffer_0x00, 0x00, sizeof(buffer_0x00))) Iterator();
|
||||
}
|
||||
|
||||
template<class Iterator>
|
||||
const Iterator &on_0xFF_buffer()
|
||||
{
|
||||
BOOST_STATIC_ASSERT(sizeof(buffer_t) >= sizeof(Iterator));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(sizeof(buffer_t) >= sizeof(Iterator));
|
||||
return * ::new(std::memset(&buffer_0xFF, 0xFF, sizeof(buffer_0xFF))) Iterator();
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
#include <boost/intrusive/pack_options.hpp>
|
||||
#include <boost/intrusive/detail/mpl.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
struct empty_default{};
|
||||
|
||||
@ -18,12 +17,12 @@ using namespace boost::intrusive;
|
||||
//Test BOOST_INTRUSIVE_OPTION_CONSTANT
|
||||
BOOST_INTRUSIVE_OPTION_CONSTANT(incremental, bool, Enabled, is_incremental)
|
||||
const bool is_incremental_value = pack_options< empty_default, incremental<true> >::type::is_incremental;
|
||||
BOOST_STATIC_ASSERT(( is_incremental_value == true ));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( is_incremental_value == true ));
|
||||
|
||||
//Test BOOST_INTRUSIVE_OPTION_TYPE
|
||||
BOOST_INTRUSIVE_OPTION_TYPE(my_pointer, VoidPointer, typename boost::intrusive::detail::remove_pointer<VoidPointer>::type, my_pointer_type)
|
||||
typedef pack_options< empty_default, my_pointer<void*> >::type::my_pointer_type my_pointer_type;
|
||||
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<my_pointer_type, void>::value ));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( boost::intrusive::detail::is_same<my_pointer_type, void>::value ));
|
||||
|
||||
//test combination of BOOST_INTRUSIVE_OPTION_CONSTANT and BOOST_INTRUSIVE_OPTION_TYPE
|
||||
// First add new options
|
||||
@ -41,13 +40,13 @@ typedef pack_options < default_options
|
||||
, incremental2<true>
|
||||
, my_pointer2<const char*>
|
||||
>::type combined_type;
|
||||
BOOST_STATIC_ASSERT(( combined_type::is_incremental == false ));
|
||||
BOOST_STATIC_ASSERT(( combined_type::is_incremental2 == true ));
|
||||
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<combined_type::my_pointer_type, float >::value ));
|
||||
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<combined_type::my_pointer_type2, const char**>::value ));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( combined_type::is_incremental == false ));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( combined_type::is_incremental2 == true ));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( boost::intrusive::detail::is_same<combined_type::my_pointer_type, float >::value ));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( boost::intrusive::detail::is_same<combined_type::my_pointer_type2, const char**>::value ));
|
||||
|
||||
//test packing the default options leads to a default options type
|
||||
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<pack_options<default_options>::type, default_options>::value ));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( boost::intrusive::detail::is_same<pack_options<default_options>::type, default_options>::value ));
|
||||
|
||||
int main()
|
||||
{
|
||||
|
@ -8,7 +8,6 @@
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
#include <boost/intrusive/detail/mpl.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/intrusive/pointer_traits.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
|
||||
@ -162,13 +161,13 @@ int main()
|
||||
int dummy;
|
||||
|
||||
//Raw pointer
|
||||
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||
<int*>::element_type, int>::value ));
|
||||
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||
<int*>::pointer, int*>::value ));
|
||||
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||
<int*>::difference_type, std::ptrdiff_t>::value ));
|
||||
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||
<int*>::rebind_pointer<double>::type
|
||||
, double*>::value ));
|
||||
BOOST_TEST(boost::intrusive::pointer_traits<int*>::pointer_to(dummy) == &dummy);
|
||||
@ -177,13 +176,13 @@ int main()
|
||||
BOOST_TEST(boost::intrusive::pointer_traits<DD*>:: dynamic_cast_from((B*)0) == 0);
|
||||
|
||||
//Complete smart pointer
|
||||
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||
< CompleteSmartPtr<int> >::element_type, int>::value ));
|
||||
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||
< CompleteSmartPtr<int> >::pointer, CompleteSmartPtr<int> >::value ));
|
||||
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||
< CompleteSmartPtr<int> >::difference_type, char>::value ));
|
||||
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||
< CompleteSmartPtr<int> >::rebind_pointer<double>::type
|
||||
, CompleteSmartPtr<double> >::value ));
|
||||
//pointer_to
|
||||
@ -204,13 +203,13 @@ int main()
|
||||
BOOST_TEST(CompleteSmartPtrStats::dynamic_cast_called == 1);
|
||||
|
||||
//Simple smart pointer
|
||||
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||
< SimpleSmartPtr<int> >::element_type, int>::value ));
|
||||
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||
< SimpleSmartPtr<int> >::pointer, SimpleSmartPtr<int> >::value ));
|
||||
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||
< SimpleSmartPtr<int> >::difference_type, std::ptrdiff_t>::value ));
|
||||
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||
< SimpleSmartPtr<int> >::rebind_pointer<double>::type
|
||||
, SimpleSmartPtr<double> >::value ));
|
||||
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include <boost/intrusive/splay_set.hpp>
|
||||
#include <boost/intrusive/treap_set.hpp>
|
||||
#include <boost/intrusive/detail/mpl.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include "smart_ptr.hpp"
|
||||
#include <functional> //std::greater/std::less
|
||||
|
||||
@ -87,227 +86,227 @@ int main()
|
||||
////////////
|
||||
// list
|
||||
////////////
|
||||
BOOST_STATIC_ASSERT((!detail::is_same< list<MyClass<> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< list<MyClass<> >::iterator
|
||||
, list<MyClass<> >::const_iterator
|
||||
>::value));
|
||||
//constant_time_size does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< list<MyClass<>, constant_time_size<true> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< list<MyClass<>, constant_time_size<true> >::iterator
|
||||
, list<MyClass<>, constant_time_size<false> >::iterator
|
||||
>::value));
|
||||
//void_pointer does change iterator
|
||||
BOOST_STATIC_ASSERT((!detail::is_same< list<MyClass<> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< list<MyClass<> >::iterator
|
||||
, list<MyClass<smart_ptr<void> > >::iterator
|
||||
>::value));
|
||||
//size_type does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< list<MyClass<>, size_type<unsigned int > >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< list<MyClass<>, size_type<unsigned int > >::iterator
|
||||
, list<MyClass<>, size_type<unsigned char> >::iterator
|
||||
>::value));
|
||||
////////////
|
||||
// slist
|
||||
////////////
|
||||
BOOST_STATIC_ASSERT((!detail::is_same< slist<MyClass<> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< slist<MyClass<> >::iterator
|
||||
, slist<MyClass<> >::const_iterator
|
||||
>::value));
|
||||
//constant_time_size does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< slist<MyClass<>, constant_time_size<true> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< slist<MyClass<>, constant_time_size<true> >::iterator
|
||||
, slist<MyClass<>, constant_time_size<false> >::iterator
|
||||
>::value));
|
||||
//void_pointer does change iterator
|
||||
BOOST_STATIC_ASSERT((!detail::is_same< slist<MyClass<> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< slist<MyClass<> >::iterator
|
||||
, slist<MyClass<smart_ptr<void> > >::iterator
|
||||
>::value));
|
||||
//size_type does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< slist<MyClass<>, size_type<unsigned int > >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< slist<MyClass<>, size_type<unsigned int > >::iterator
|
||||
, slist<MyClass<>, size_type<unsigned char> >::iterator
|
||||
>::value));
|
||||
//cache_last does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< slist<MyClass<>, cache_last<false> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< slist<MyClass<>, cache_last<false> >::iterator
|
||||
, slist<MyClass<>, cache_last<true> >::iterator
|
||||
>::value));
|
||||
//linear does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< slist<MyClass<>, linear<false> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< slist<MyClass<>, linear<false> >::iterator
|
||||
, slist<MyClass<>, linear<true> >::iterator
|
||||
>::value));
|
||||
////////////
|
||||
// set
|
||||
////////////
|
||||
BOOST_STATIC_ASSERT((!detail::is_same< set<MyClass<> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< set<MyClass<> >::iterator
|
||||
, set<MyClass<> >::const_iterator
|
||||
>::value));
|
||||
//constant_time_size does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< set<MyClass<>, constant_time_size<true> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< set<MyClass<>, constant_time_size<true> >::iterator
|
||||
, set<MyClass<>, constant_time_size<false> >::iterator
|
||||
>::value));
|
||||
//void_pointer does change iterator
|
||||
BOOST_STATIC_ASSERT((!detail::is_same< set<MyClass<> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< set<MyClass<> >::iterator
|
||||
, set<MyClass<smart_ptr<void> > >::iterator
|
||||
>::value));
|
||||
//size_type does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< set<MyClass<>, size_type<unsigned int > >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< set<MyClass<>, size_type<unsigned int > >::iterator
|
||||
, set<MyClass<>, size_type<unsigned char> >::iterator
|
||||
>::value));
|
||||
//compare does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< set<MyClass<>, compare< std::greater<MyClass<> > > >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< set<MyClass<>, compare< std::greater<MyClass<> > > >::iterator
|
||||
, set<MyClass<>, compare< std::less<MyClass<> > > >::iterator
|
||||
>::value));
|
||||
////////////
|
||||
// avl_set
|
||||
////////////
|
||||
BOOST_STATIC_ASSERT((!detail::is_same< avl_set<MyClass<> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< avl_set<MyClass<> >::iterator
|
||||
, avl_set<MyClass<> >::const_iterator
|
||||
>::value));
|
||||
//constant_time_size does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< avl_set<MyClass<>, constant_time_size<true> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< avl_set<MyClass<>, constant_time_size<true> >::iterator
|
||||
, avl_set<MyClass<>, constant_time_size<false> >::iterator
|
||||
>::value));
|
||||
//void_pointer does change iterator
|
||||
BOOST_STATIC_ASSERT((!detail::is_same< avl_set<MyClass<> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< avl_set<MyClass<> >::iterator
|
||||
, avl_set<MyClass<smart_ptr<void> > >::iterator
|
||||
>::value));
|
||||
//size_type does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< avl_set<MyClass<>, size_type<unsigned int > >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< avl_set<MyClass<>, size_type<unsigned int > >::iterator
|
||||
, avl_set<MyClass<>, size_type<unsigned char> >::iterator
|
||||
>::value));
|
||||
//compare does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< avl_set<MyClass<>, compare< std::greater<MyClass<> > > >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< avl_set<MyClass<>, compare< std::greater<MyClass<> > > >::iterator
|
||||
, avl_set<MyClass<>, compare< std::less<MyClass<> > > >::iterator
|
||||
>::value));
|
||||
////////////
|
||||
// sg_set
|
||||
////////////
|
||||
BOOST_STATIC_ASSERT((!detail::is_same< sg_set<MyClass<> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< sg_set<MyClass<> >::iterator
|
||||
, sg_set<MyClass<> >::const_iterator
|
||||
>::value));
|
||||
//void_pointer does change iterator
|
||||
BOOST_STATIC_ASSERT((!detail::is_same< sg_set<MyClass<> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< sg_set<MyClass<> >::iterator
|
||||
, sg_set<MyClass<smart_ptr<void> > >::iterator
|
||||
>::value));
|
||||
//size_type does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< sg_set<MyClass<>, size_type<unsigned int > >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< sg_set<MyClass<>, size_type<unsigned int > >::iterator
|
||||
, sg_set<MyClass<>, size_type<unsigned char> >::iterator
|
||||
>::value));
|
||||
//compare does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< sg_set<MyClass<>, compare< std::greater<MyClass<> > > >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< sg_set<MyClass<>, compare< std::greater<MyClass<> > > >::iterator
|
||||
, sg_set<MyClass<>, compare< std::less<MyClass<> > > >::iterator
|
||||
>::value));
|
||||
//floating_point does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< sg_set<MyClass<>, floating_point<false> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< sg_set<MyClass<>, floating_point<false> >::iterator
|
||||
, sg_set<MyClass<>, floating_point<true> >::iterator
|
||||
>::value));
|
||||
////////////
|
||||
// bs_set
|
||||
////////////
|
||||
BOOST_STATIC_ASSERT((!detail::is_same< bs_set<MyClass<> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< bs_set<MyClass<> >::iterator
|
||||
, bs_set<MyClass<> >::const_iterator
|
||||
>::value));
|
||||
//constant_time_size does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< bs_set<MyClass<>, constant_time_size<true> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< bs_set<MyClass<>, constant_time_size<true> >::iterator
|
||||
, bs_set<MyClass<>, constant_time_size<false> >::iterator
|
||||
>::value));
|
||||
//void_pointer does change iterator
|
||||
BOOST_STATIC_ASSERT((!detail::is_same< bs_set<MyClass<> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< bs_set<MyClass<> >::iterator
|
||||
, bs_set<MyClass<smart_ptr<void> > >::iterator
|
||||
>::value));
|
||||
//size_type does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< bs_set<MyClass<>, size_type<unsigned int > >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< bs_set<MyClass<>, size_type<unsigned int > >::iterator
|
||||
, bs_set<MyClass<>, size_type<unsigned char> >::iterator
|
||||
>::value));
|
||||
//compare does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< bs_set<MyClass<>, compare< std::greater<MyClass<> > > >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< bs_set<MyClass<>, compare< std::greater<MyClass<> > > >::iterator
|
||||
, bs_set<MyClass<>, compare< std::less<MyClass<> > > >::iterator
|
||||
>::value));
|
||||
////////////
|
||||
// splay_set
|
||||
////////////
|
||||
BOOST_STATIC_ASSERT((!detail::is_same< splay_set<MyClass<> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< splay_set<MyClass<> >::iterator
|
||||
, splay_set<MyClass<> >::const_iterator
|
||||
>::value));
|
||||
//constant_time_size does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< splay_set<MyClass<>, constant_time_size<true> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< splay_set<MyClass<>, constant_time_size<true> >::iterator
|
||||
, splay_set<MyClass<>, constant_time_size<false> >::iterator
|
||||
>::value));
|
||||
//void_pointer does change iterator
|
||||
BOOST_STATIC_ASSERT((!detail::is_same< splay_set<MyClass<> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< splay_set<MyClass<> >::iterator
|
||||
, splay_set<MyClass<smart_ptr<void> > >::iterator
|
||||
>::value));
|
||||
//size_type does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< splay_set<MyClass<>, size_type<unsigned int > >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< splay_set<MyClass<>, size_type<unsigned int > >::iterator
|
||||
, splay_set<MyClass<>, size_type<unsigned char> >::iterator
|
||||
>::value));
|
||||
//compare does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< splay_set<MyClass<>, compare< std::greater<MyClass<> > > >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< splay_set<MyClass<>, compare< std::greater<MyClass<> > > >::iterator
|
||||
, splay_set<MyClass<>, compare< std::less<MyClass<> > > >::iterator
|
||||
>::value));
|
||||
////////////
|
||||
// treap_set
|
||||
////////////
|
||||
BOOST_STATIC_ASSERT((!detail::is_same< treap_set<MyClass<> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< treap_set<MyClass<> >::iterator
|
||||
, treap_set<MyClass<> >::const_iterator
|
||||
>::value));
|
||||
//constant_time_size does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< treap_set<MyClass<>, constant_time_size<true> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< treap_set<MyClass<>, constant_time_size<true> >::iterator
|
||||
, treap_set<MyClass<>, constant_time_size<false> >::iterator
|
||||
>::value));
|
||||
//void_pointer does change iterator
|
||||
BOOST_STATIC_ASSERT((!detail::is_same< treap_set<MyClass<> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< treap_set<MyClass<> >::iterator
|
||||
, treap_set<MyClass<smart_ptr<void> > >::iterator
|
||||
>::value));
|
||||
//size_type does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< treap_set<MyClass<>, size_type<unsigned int > >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< treap_set<MyClass<>, size_type<unsigned int > >::iterator
|
||||
, treap_set<MyClass<>, size_type<unsigned char> >::iterator
|
||||
>::value));
|
||||
//compare does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< treap_set<MyClass<>, compare< std::greater<MyClass<> > > >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< treap_set<MyClass<>, compare< std::greater<MyClass<> > > >::iterator
|
||||
, treap_set<MyClass<>, compare< std::less<MyClass<> > > >::iterator
|
||||
>::value));
|
||||
//priority does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< treap_set<MyClass<> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< treap_set<MyClass<> >::iterator
|
||||
, treap_set<MyClass<>, priority< inverse_priority<MyClass<> > > >::iterator
|
||||
>::value));
|
||||
//////////////
|
||||
// common tree
|
||||
//////////////
|
||||
BOOST_STATIC_ASSERT((detail::is_same< bs_set<MyClass<> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< bs_set<MyClass<> >::iterator
|
||||
, sg_set<MyClass<> >::iterator
|
||||
>::value));
|
||||
BOOST_STATIC_ASSERT((detail::is_same< bs_set<MyClass<> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< bs_set<MyClass<> >::iterator
|
||||
, treap_set<MyClass<> >::iterator
|
||||
>::value));
|
||||
BOOST_STATIC_ASSERT((detail::is_same< bs_set<MyClass<> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< bs_set<MyClass<> >::iterator
|
||||
, splay_set<MyClass<> >::iterator
|
||||
>::value));
|
||||
////////////
|
||||
// unordered_set
|
||||
////////////
|
||||
BOOST_STATIC_ASSERT((!detail::is_same< unordered_set<MyClass<> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< unordered_set<MyClass<> >::iterator
|
||||
, unordered_set<MyClass<> >::const_iterator
|
||||
>::value));
|
||||
//constant_time_size does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< unordered_set<MyClass<>, constant_time_size<true> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< unordered_set<MyClass<>, constant_time_size<true> >::iterator
|
||||
, unordered_set<MyClass<>, constant_time_size<false> >::iterator
|
||||
>::value));
|
||||
//void_pointer does change iterator
|
||||
BOOST_STATIC_ASSERT((!detail::is_same< unordered_set<MyClass<> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< unordered_set<MyClass<> >::iterator
|
||||
, unordered_set<MyClass<smart_ptr<void> > >::iterator
|
||||
>::value));
|
||||
//size_type does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< unordered_set<MyClass<>, size_type<unsigned int > >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< unordered_set<MyClass<>, size_type<unsigned int > >::iterator
|
||||
, unordered_set<MyClass<>, size_type<unsigned char> >::iterator
|
||||
>::value));
|
||||
//hash does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< unordered_set<MyClass<> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< unordered_set<MyClass<> >::iterator
|
||||
, unordered_set<MyClass<>, hash< inverse_hash<MyClass<> > > >::iterator
|
||||
>::value));
|
||||
//equal does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< unordered_set<MyClass<> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< unordered_set<MyClass<> >::iterator
|
||||
, unordered_set<MyClass<>, equal< alternative_equal<MyClass<> > > >::iterator
|
||||
>::value));
|
||||
//power_2_buckets does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< unordered_set<MyClass<> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< unordered_set<MyClass<> >::iterator
|
||||
, unordered_set<MyClass<>, power_2_buckets<true> >::iterator
|
||||
>::value));
|
||||
//cache_begin does not change iterator
|
||||
BOOST_STATIC_ASSERT((detail::is_same< unordered_set<MyClass<> >::iterator
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< unordered_set<MyClass<> >::iterator
|
||||
, unordered_set<MyClass<>, cache_begin<true> >::iterator
|
||||
>::value));
|
||||
return 0;
|
||||
|
@ -39,7 +39,7 @@ struct rebinder
|
||||
, Option1
|
||||
, Option2
|
||||
> type;
|
||||
BOOST_STATIC_ASSERT((key_type_tester<typename common_t::key_of_value_opt, type>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((key_type_tester<typename common_t::key_of_value_opt, type>::value));
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -38,7 +38,7 @@ struct rebinder
|
||||
, Option1
|
||||
, Option2
|
||||
> type;
|
||||
BOOST_STATIC_ASSERT((key_type_tester<typename common_t::key_of_value_opt, type>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((key_type_tester<typename common_t::key_of_value_opt, type>::value));
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -38,7 +38,7 @@ struct rebinder
|
||||
, Option1
|
||||
, Option2
|
||||
> type;
|
||||
BOOST_STATIC_ASSERT((key_type_tester<typename common_t::key_of_value_opt, type>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((key_type_tester<typename common_t::key_of_value_opt, type>::value));
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -38,7 +38,7 @@ struct rebinder
|
||||
, Option1
|
||||
, Option2
|
||||
> type;
|
||||
BOOST_STATIC_ASSERT((key_type_tester<typename common_t::key_of_value_opt, type>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((key_type_tester<typename common_t::key_of_value_opt, type>::value));
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -38,7 +38,7 @@ struct rebinder
|
||||
, Option1
|
||||
, Option2
|
||||
> type;
|
||||
BOOST_STATIC_ASSERT((key_type_tester<typename common_t::key_of_value_opt, type>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((key_type_tester<typename common_t::key_of_value_opt, type>::value));
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -25,15 +25,15 @@ struct key_type_tester
|
||||
struct empty_default{};
|
||||
typedef typename pack_options< empty_default, KeyOfValueOption >::type::key_of_value key_of_value_t;
|
||||
|
||||
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same< KeyOfValueOption
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( boost::intrusive::detail::is_same< KeyOfValueOption
|
||||
, key_of_value<int_holder_key_of_value<typename Map::value_type> >
|
||||
>::value ));
|
||||
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same< key_of_value_t
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( boost::intrusive::detail::is_same< key_of_value_t
|
||||
, int_holder_key_of_value<typename Map::value_type>
|
||||
>::value ));
|
||||
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same< typename Map::key_type
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( boost::intrusive::detail::is_same< typename Map::key_type
|
||||
, typename key_of_value_t::type >::value ));
|
||||
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same< typename Map::key_of_value
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( boost::intrusive::detail::is_same< typename Map::key_of_value
|
||||
, key_of_value_t >::value ));
|
||||
static const bool value = true;
|
||||
};
|
||||
@ -41,11 +41,11 @@ struct key_type_tester
|
||||
template <class Map>
|
||||
struct key_type_tester<void, Map>
|
||||
{
|
||||
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same< typename Map::key_type
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( boost::intrusive::detail::is_same< typename Map::key_type
|
||||
, typename Map::value_type
|
||||
>::value ));
|
||||
|
||||
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same< typename Map::key_of_value
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT(( boost::intrusive::detail::is_same< typename Map::key_of_value
|
||||
, boost::intrusive::detail::identity< typename Map::value_type>
|
||||
>::value ));
|
||||
static const bool value = true;
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include <boost/move/utility_core.hpp>
|
||||
#include <boost/move/adl_move_swap.hpp>
|
||||
#include <boost/intrusive/detail/mpl.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include "iterator_test.hpp"
|
||||
#include <cstdlib>
|
||||
|
||||
|
@ -40,7 +40,7 @@ struct rebinder
|
||||
, Option1
|
||||
, Option2
|
||||
> type;
|
||||
BOOST_STATIC_ASSERT((key_type_tester<typename common_t::key_of_value_opt, type>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((key_type_tester<typename common_t::key_of_value_opt, type>::value));
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -39,7 +39,7 @@ struct rebinder
|
||||
, Option1
|
||||
, Option2
|
||||
> type;
|
||||
BOOST_STATIC_ASSERT((key_type_tester<typename common_t::key_of_value_opt, type>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((key_type_tester<typename common_t::key_of_value_opt, type>::value));
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -53,8 +53,8 @@ struct rebinder
|
||||
, Option1
|
||||
, Option2
|
||||
> type;
|
||||
BOOST_STATIC_ASSERT((key_type_tester<typename common_t::key_of_value_opt, type>::value));
|
||||
BOOST_STATIC_ASSERT((boost::intrusive::test::is_multikey_true<type>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((key_type_tester<typename common_t::key_of_value_opt, type>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((boost::intrusive::test::is_multikey_true<type>::value));
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -51,8 +51,8 @@ struct rebinder
|
||||
, Option1
|
||||
, Option2
|
||||
> type;
|
||||
BOOST_STATIC_ASSERT((key_type_tester<typename common_t::key_of_value_opt, type>::value));
|
||||
BOOST_STATIC_ASSERT((!boost::intrusive::test::is_multikey_true<type>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((key_type_tester<typename common_t::key_of_value_opt, type>::value));
|
||||
BOOST_INTRUSIVE_STATIC_ASSERT((!boost::intrusive::test::is_multikey_true<type>::value));
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user