From e84e9b7b2e1871fd99c57445cd32b1a0e56d2a2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Tue, 2 Jan 2024 01:42:05 +0100 Subject: [PATCH] Use BOOST_INTRUSIVE_STATIC_ASSERT instead of BOOST_STATIC_ASSERT to reduce library level and weight. --- example/doc_map.cpp | 5 - include/boost/intrusive/avl_set.hpp | 5 +- include/boost/intrusive/avltree.hpp | 3 +- include/boost/intrusive/bs_set.hpp | 5 +- include/boost/intrusive/bstree.hpp | 13 +-- .../boost/intrusive/detail/generic_hook.hpp | 5 +- .../intrusive/detail/parent_from_member.hpp | 5 +- .../boost/intrusive/detail/slist_iterator.hpp | 3 +- include/boost/intrusive/detail/workaround.hpp | 28 +++++ include/boost/intrusive/hashtable.hpp | 19 ++-- include/boost/intrusive/list.hpp | 11 +- include/boost/intrusive/pack_options.hpp | 6 +- include/boost/intrusive/rbtree.hpp | 3 +- include/boost/intrusive/set.hpp | 5 +- include/boost/intrusive/sg_set.hpp | 5 +- include/boost/intrusive/sgtree.hpp | 7 +- include/boost/intrusive/slist.hpp | 29 +++-- include/boost/intrusive/splay_set.hpp | 5 +- include/boost/intrusive/splaytree.hpp | 3 +- include/boost/intrusive/treap.hpp | 3 +- include/boost/intrusive/treap_set.hpp | 5 +- include/boost/intrusive/unordered_set.hpp | 5 +- test/avl_multiset_test.cpp | 2 +- test/avl_set_test.cpp | 2 +- test/bs_multiset_test.cpp | 2 +- test/bs_set_test.cpp | 2 +- test/common_functors.hpp | 2 +- test/container_size_test.cpp | 1 - test/custom_bucket_traits_test.cpp | 17 ++- test/iterator_test.hpp | 65 ++++++----- test/make_functions_test.cpp | 25 ++--- test/multiset_test.cpp | 2 +- test/nonhook_node.hpp | 3 +- test/null_iterator_test.cpp | 5 +- test/pack_options_test.cpp | 15 ++- test/pointer_traits_test.cpp | 25 ++--- test/scary_iterators_test.cpp | 105 +++++++++--------- test/set_test.cpp | 2 +- test/sg_multiset_test.cpp | 2 +- test/sg_set_test.cpp | 2 +- test/splay_multiset_test.cpp | 2 +- test/splay_set_test.cpp | 2 +- test/test_common.hpp | 12 +- test/test_container.hpp | 1 - test/treap_multiset_test.cpp | 2 +- test/treap_set_test.cpp | 2 +- test/unordered_multiset_test.cpp | 4 +- test/unordered_set_test.cpp | 4 +- 48 files changed, 240 insertions(+), 246 deletions(-) diff --git a/example/doc_map.cpp b/example/doc_map.cpp index 3f07c933..1525636d 100644 --- a/example/doc_map.cpp +++ b/example/doc_map.cpp @@ -10,8 +10,6 @@ // ///////////////////////////////////////////////////////////////////////////// //[doc_map_code -#include -#include #include #include #include @@ -50,9 +48,6 @@ typedef unordered_set< MyClass, key_of_value > UnorderedMap; int main() { - BOOST_STATIC_ASSERT((boost::is_same< OrderedMap::key_type, int>::value)); - BOOST_STATIC_ASSERT((boost::is_same::value)); - //Create several MyClass objects, each one with a different value //and insert them into the omap std::vector values; diff --git a/include/boost/intrusive/avl_set.hpp b/include/boost/intrusive/avl_set.hpp index 2d95c8fa..2d76ece7 100644 --- a/include/boost/intrusive/avl_set.hpp +++ b/include/boost/intrusive/avl_set.hpp @@ -17,7 +17,6 @@ #include #include #include -#include #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::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::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::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::value)); inline avl_multiset() : Base() diff --git a/include/boost/intrusive/avltree.hpp b/include/boost/intrusive/avltree.hpp index 7647ee84..4eda39e6 100644 --- a/include/boost/intrusive/avltree.hpp +++ b/include/boost/intrusive/avltree.hpp @@ -18,7 +18,6 @@ #include #include -#include #include #include #include @@ -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::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::value)); inline avltree() : Base() diff --git a/include/boost/intrusive/bs_set.hpp b/include/boost/intrusive/bs_set.hpp index 24795561..c3275ddf 100644 --- a/include/boost/intrusive/bs_set.hpp +++ b/include/boost/intrusive/bs_set.hpp @@ -17,7 +17,6 @@ #include #include #include -#include #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::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::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::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::value)); inline bs_multiset() : Base() diff --git a/include/boost/intrusive/bstree.hpp b/include/boost/intrusive/bstree.hpp index 3e581475..8196d36b 100644 --- a/include/boost/intrusive/bstree.hpp +++ b/include/boost/intrusive/bstree.hpp @@ -16,7 +16,6 @@ #include #include -#include #include #include #include @@ -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(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::const_cast_from(pointer_traits::pointer_to(value))), const_value_traits_ptr()); } @@ -666,7 +665,7 @@ class bstree_impl static const bool safemode_or_autounlink = is_safe_autounlink::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::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::value)); inline bstree() : Base() diff --git a/include/boost/intrusive/detail/generic_hook.hpp b/include/boost/intrusive/detail/generic_hook.hpp index acfc51aa..e7b62c65 100644 --- a/include/boost/intrusive/detail/generic_hook.hpp +++ b/include/boost/intrusive/detail/generic_hook.hpp @@ -27,7 +27,6 @@ #include #include #include -#include 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); diff --git a/include/boost/intrusive/detail/parent_from_member.hpp b/include/boost/intrusive/detail/parent_from_member.hpp index cb1e2fbf..8f1156e3 100644 --- a/include/boost/intrusive/detail/parent_from_member.hpp +++ b/include/boost/intrusive/detail/parent_from_member.hpp @@ -26,8 +26,7 @@ #if defined(_MSC_VER) #define BOOST_INTRUSIVE_MSVC_ABI_PTR_TO_MEMBER - #include -#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); diff --git a/include/boost/intrusive/detail/slist_iterator.hpp b/include/boost/intrusive/detail/slist_iterator.hpp index a87d0af8..64387c4a 100644 --- a/include/boost/intrusive/detail/slist_iterator.hpp +++ b/include/boost/intrusive/detail/slist_iterator.hpp @@ -27,7 +27,6 @@ #include #include #include -#include 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()) diff --git a/include/boost/intrusive/detail/workaround.hpp b/include/boost/intrusive/detail/workaround.hpp index 4dace20a..fd0302bd 100644 --- a/include/boost/intrusive/detail/workaround.hpp +++ b/include/boost/intrusive/detail/workaround.hpp @@ -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 +struct STATIC_ASSERTION_FAILURE; + +template<> +struct STATIC_ASSERTION_FAILURE{}; + +template 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)>\ + BOOST_JOIN(boost_static_assert_typedef_, __LINE__) BOOST_ATTRIBUTE_UNUSED + +#endif + #endif //#ifndef BOOST_INTRUSIVE_DETAIL_WORKAROUND_HPP diff --git a/include/boost/intrusive/hashtable.hpp b/include/boost/intrusive/hashtable.hpp index 8a0e01d8..ab51d1dc 100644 --- a/include/boost/intrusive/hashtable.hpp +++ b/include/boost/intrusive/hashtable.hpp @@ -60,7 +60,6 @@ //boost #include -#include #include #include #include @@ -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::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(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::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::value)); inline explicit hashtable ( const bucket_traits &b_traits , const hasher & hash_func = hasher() diff --git a/include/boost/intrusive/list.hpp b/include/boost/intrusive/list.hpp index 18c1a5c5..9871d973 100644 --- a/include/boost/intrusive/list.hpp +++ b/include/boost/intrusive/list.hpp @@ -37,7 +37,6 @@ #include #include -#include #include #include //std::size_t, etc. @@ -123,7 +122,7 @@ class list_impl static const bool safemode_or_autounlink = is_safe_autounlink::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::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::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::value)); BOOST_MOVABLE_BUT_NOT_COPYABLE(list) public: diff --git a/include/boost/intrusive/pack_options.hpp b/include/boost/intrusive/pack_options.hpp index 66761d76..20e093e9 100644 --- a/include/boost/intrusive/pack_options.hpp +++ b/include/boost/intrusive/pack_options.hpp @@ -14,7 +14,7 @@ #define BOOST_INTRUSIVE_PACK_OPTIONS_HPP #include - +#include #if defined(BOOST_HAS_PRAGMA_ONCE) # pragma once #endif @@ -338,7 +338,7 @@ struct pack_options //! //! typedef pack_options< empty_default, typename my_pointer >::type::my_pointer_type type; //! -//! BOOST_STATIC_ASSERT(( boost::is_same::value )); +//! BOOST_INTRUSIVE_STATIC_ASSERT(( boost::is_same::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 >::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) diff --git a/include/boost/intrusive/rbtree.hpp b/include/boost/intrusive/rbtree.hpp index 524d6350..04fce1ee 100644 --- a/include/boost/intrusive/rbtree.hpp +++ b/include/boost/intrusive/rbtree.hpp @@ -29,7 +29,6 @@ #include #include -#include #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::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::value)); inline rbtree() : Base() diff --git a/include/boost/intrusive/set.hpp b/include/boost/intrusive/set.hpp index cb9ea8fc..2a5859c0 100644 --- a/include/boost/intrusive/set.hpp +++ b/include/boost/intrusive/set.hpp @@ -19,7 +19,6 @@ #include #include #include -#include #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::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::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::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::value)); inline multiset() : Base() diff --git a/include/boost/intrusive/sg_set.hpp b/include/boost/intrusive/sg_set.hpp index 7ccb7e73..ed0af556 100644 --- a/include/boost/intrusive/sg_set.hpp +++ b/include/boost/intrusive/sg_set.hpp @@ -16,7 +16,6 @@ #include #include #include -#include #include #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::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::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::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::value)); inline sg_multiset() : Base() diff --git a/include/boost/intrusive/sgtree.hpp b/include/boost/intrusive/sgtree.hpp index 5990ff10..aaee1651 100644 --- a/include/boost/intrusive/sgtree.hpp +++ b/include/boost/intrusive/sgtree.hpp @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -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::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::value)); inline sgtree() : Base() diff --git a/include/boost/intrusive/slist.hpp b/include/boost/intrusive/slist.hpp index 85c9deb2..f39e7dfc 100644 --- a/include/boost/intrusive/slist.hpp +++ b/include/boost/intrusive/slist.hpp @@ -41,7 +41,6 @@ #include #include -#include #include //std::size_t @@ -166,11 +165,11 @@ class slist_impl static const bool safemode_or_autounlink = is_safe_autounlink::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 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 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::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::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::value)); BOOST_MOVABLE_BUT_NOT_COPYABLE(slist) public: diff --git a/include/boost/intrusive/splay_set.hpp b/include/boost/intrusive/splay_set.hpp index 217068d3..f11424ac 100644 --- a/include/boost/intrusive/splay_set.hpp +++ b/include/boost/intrusive/splay_set.hpp @@ -17,7 +17,6 @@ #include #include #include -#include #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::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::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::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::value)); inline splay_multiset() : Base() diff --git a/include/boost/intrusive/splaytree.hpp b/include/boost/intrusive/splaytree.hpp index 208a3e36..e25647c6 100644 --- a/include/boost/intrusive/splaytree.hpp +++ b/include/boost/intrusive/splaytree.hpp @@ -18,7 +18,6 @@ #include #include //std::pair -#include #include #include #include @@ -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::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::value)); inline splaytree() : Base() diff --git a/include/boost/intrusive/treap.hpp b/include/boost/intrusive/treap.hpp index 34dae3b7..4d8c9161 100644 --- a/include/boost/intrusive/treap.hpp +++ b/include/boost/intrusive/treap.hpp @@ -29,7 +29,6 @@ #include #include -#include #include #include @@ -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::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::value)); inline treap() : Base() diff --git a/include/boost/intrusive/treap_set.hpp b/include/boost/intrusive/treap_set.hpp index f0ede210..f6a7a8fe 100644 --- a/include/boost/intrusive/treap_set.hpp +++ b/include/boost/intrusive/treap_set.hpp @@ -17,7 +17,6 @@ #include #include #include -#include #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::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::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::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::value)); inline treap_multiset() : Base() diff --git a/include/boost/intrusive/unordered_set.hpp b/include/boost/intrusive/unordered_set.hpp index 7b659fe7..67762838 100644 --- a/include/boost/intrusive/unordered_set.hpp +++ b/include/boost/intrusive/unordered_set.hpp @@ -17,7 +17,6 @@ #include #include #include -#include #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::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::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::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::value)); BOOST_MOVABLE_BUT_NOT_COPYABLE(unordered_multiset) public: diff --git a/test/avl_multiset_test.cpp b/test/avl_multiset_test.cpp index 753795ad..3fbdeb1a 100644 --- a/test/avl_multiset_test.cpp +++ b/test/avl_multiset_test.cpp @@ -39,7 +39,7 @@ struct rebinder , Option1 , Option2 > type; - BOOST_STATIC_ASSERT((key_type_tester::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((key_type_tester::value)); }; }; diff --git a/test/avl_set_test.cpp b/test/avl_set_test.cpp index eb4cb51c..8139dc39 100644 --- a/test/avl_set_test.cpp +++ b/test/avl_set_test.cpp @@ -39,7 +39,7 @@ struct rebinder , Option1 , Option2 > type; - BOOST_STATIC_ASSERT((key_type_tester::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((key_type_tester::value)); }; }; diff --git a/test/bs_multiset_test.cpp b/test/bs_multiset_test.cpp index 0713eb92..dbec440c 100644 --- a/test/bs_multiset_test.cpp +++ b/test/bs_multiset_test.cpp @@ -38,7 +38,7 @@ struct rebinder , Option1 , Option2 > type; - BOOST_STATIC_ASSERT((key_type_tester::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((key_type_tester::value)); }; }; diff --git a/test/bs_set_test.cpp b/test/bs_set_test.cpp index e30022fe..92f86332 100644 --- a/test/bs_set_test.cpp +++ b/test/bs_set_test.cpp @@ -38,7 +38,7 @@ struct rebinder , Option1 , Option2 > type; - BOOST_STATIC_ASSERT((key_type_tester::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((key_type_tester::value)); }; }; diff --git a/test/common_functors.hpp b/test/common_functors.hpp index b84a84a1..98c0869e 100644 --- a/test/common_functors.hpp +++ b/test/common_functors.hpp @@ -30,7 +30,7 @@ class delete_disposer void operator()(Pointer p) { typedef typename boost::intrusive::iterator_traits::value_type value_type; - BOOST_STATIC_ASSERT(( detail::is_same::value )); + BOOST_INTRUSIVE_STATIC_ASSERT(( detail::is_same::value )); delete boost::movelib::to_raw_pointer(p); } }; diff --git a/test/container_size_test.cpp b/test/container_size_test.cpp index b7a8d354..d4e7e1cf 100644 --- a/test/container_size_test.cpp +++ b/test/container_size_test.cpp @@ -21,7 +21,6 @@ #include #include #include -#include #include "itestvalue.hpp" using namespace boost::intrusive; diff --git a/test/custom_bucket_traits_test.cpp b/test/custom_bucket_traits_test.cpp index 5dddaecf..d3860b6d 100644 --- a/test/custom_bucket_traits_test.cpp +++ b/test/custom_bucket_traits_test.cpp @@ -11,7 +11,6 @@ ///////////////////////////////////////////////////////////////////////////// #include #include -#include #include using namespace boost::intrusive; @@ -98,14 +97,14 @@ typedef unordered_set int main() { - BOOST_STATIC_ASSERT((detail::is_same::value)); - BOOST_STATIC_ASSERT((detail::is_same::value)); - BOOST_STATIC_ASSERT((detail::is_same::value)); - BOOST_STATIC_ASSERT((detail::is_same::value)); - BOOST_STATIC_ASSERT((detail::is_same::value)); - BOOST_STATIC_ASSERT((detail::is_same::value)); - BOOST_STATIC_ASSERT((detail::is_same::value)); - BOOST_STATIC_ASSERT((detail::is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same::value)); typedef std::vector::iterator VectIt; typedef std::vector::reverse_iterator VectRit; diff --git a/test/iterator_test.hpp b/test/iterator_test.hpp index 725e28f5..c873e9ee 100644 --- a/test/iterator_test.hpp +++ b/test/iterator_test.hpp @@ -10,7 +10,6 @@ #include #include -#include namespace boost{ namespace intrusive { namespace test{ @@ -120,8 +119,8 @@ void test_iterator_compatible(C &c) test_iterator_operations(get_reverse_iterator::begin(c), get_reverse_iterator::end(c)); test_iterator_operations(get_const_reverse_iterator::begin(c), get_const_reverse_iterator::end(c)); //Make sure dangeous conversions are not possible - BOOST_STATIC_ASSERT((!boost::intrusive::detail::is_convertible::value)); - BOOST_STATIC_ASSERT((!boost::intrusive::detail::is_convertible::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((!boost::intrusive::detail::is_convertible::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((!boost::intrusive::detail::is_convertible::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::value)); - BOOST_STATIC_ASSERT((!is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((!is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((!is_same::value)); //difference_type typedef typename C::difference_type difference_type; - BOOST_STATIC_ASSERT((is_same::value)); - BOOST_STATIC_ASSERT((is_same::value)); - BOOST_STATIC_ASSERT((is_same::value)); - BOOST_STATIC_ASSERT((is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((is_same::value)); //value_type typedef typename C::value_type value_type; - BOOST_STATIC_ASSERT((is_same::value)); - BOOST_STATIC_ASSERT((is_same::value)); - BOOST_STATIC_ASSERT((is_same::value)); - BOOST_STATIC_ASSERT((is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((is_same::value)); //pointer typedef typename C::pointer pointer; typedef typename C::const_pointer const_pointer; - BOOST_STATIC_ASSERT((is_same::value)); - BOOST_STATIC_ASSERT((is_same::value)); - BOOST_STATIC_ASSERT((is_same::value)); - BOOST_STATIC_ASSERT((is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((is_same::value)); //reference typedef typename C::reference reference; typedef typename C::const_reference const_reference; - BOOST_STATIC_ASSERT((is_same::value)); - BOOST_STATIC_ASSERT((is_same::value)); - BOOST_STATIC_ASSERT((is_same::value)); - BOOST_STATIC_ASSERT((is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((is_same::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::value)); - BOOST_STATIC_ASSERT((is_same::value)); - BOOST_STATIC_ASSERT((is_same::value)); - BOOST_STATIC_ASSERT((is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((is_same::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::value)); - BOOST_STATIC_ASSERT((is_same::value)); - BOOST_STATIC_ASSERT((is_same::value)); - BOOST_STATIC_ASSERT((is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((is_same::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::value)); - BOOST_STATIC_ASSERT((is_same::value)); - BOOST_STATIC_ASSERT((is_same::value)); - BOOST_STATIC_ASSERT((is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((is_same::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((is_same::value)); //Test dynamic test_iterator_random_and_compatible(c); } diff --git a/test/make_functions_test.cpp b/test/make_functions_test.cpp index 99078320..670dfa35 100644 --- a/test/make_functions_test.cpp +++ b/test/make_functions_test.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include "smart_ptr.hpp" #include @@ -160,52 +159,52 @@ int main() } //Check defined types and implicitly defined types are equal - BOOST_STATIC_ASSERT((detail::is_same, link_mode >::type + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same, link_mode >::type ,make_list_base_hook<>::type >::value)); - BOOST_STATIC_ASSERT((detail::is_same, link_mode >::type + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same, link_mode >::type ,make_slist_base_hook<>::type >::value)); - BOOST_STATIC_ASSERT((detail::is_same, link_mode >::type + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same, link_mode >::type ,make_set_base_hook<>::type >::value)); - BOOST_STATIC_ASSERT((detail::is_same, link_mode >::type + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same, link_mode >::type ,make_unordered_set_base_hook<>::type >::value)); - BOOST_STATIC_ASSERT((detail::is_same, link_mode >::type + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same, link_mode >::type ,make_avl_set_base_hook<>::type >::value)); - BOOST_STATIC_ASSERT((detail::is_same, link_mode >::type + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same, link_mode >::type ,make_bs_set_base_hook<>::type >::value)); //Check defined types and implicitly defined types are unequal - BOOST_STATIC_ASSERT(!(detail::is_same, link_mode >::type + BOOST_INTRUSIVE_STATIC_ASSERT(!(detail::is_same, link_mode >::type ,make_list_base_hook<>::type >::value)); - BOOST_STATIC_ASSERT(!(detail::is_same, link_mode >::type + BOOST_INTRUSIVE_STATIC_ASSERT(!(detail::is_same, link_mode >::type ,make_slist_base_hook<>::type >::value)); - BOOST_STATIC_ASSERT(!(detail::is_same, link_mode >::type + BOOST_INTRUSIVE_STATIC_ASSERT(!(detail::is_same, link_mode >::type ,make_set_base_hook<>::type >::value)); - BOOST_STATIC_ASSERT(!(detail::is_same, link_mode >::type + BOOST_INTRUSIVE_STATIC_ASSERT(!(detail::is_same, link_mode >::type ,make_unordered_set_base_hook<>::type >::value)); - BOOST_STATIC_ASSERT(!(detail::is_same, link_mode >::type + BOOST_INTRUSIVE_STATIC_ASSERT(!(detail::is_same, link_mode >::type ,make_avl_set_base_hook<>::type >::value)); - BOOST_STATIC_ASSERT(!(detail::is_same, link_mode >::type + BOOST_INTRUSIVE_STATIC_ASSERT(!(detail::is_same, link_mode >::type ,make_bs_set_base_hook<>::type >::value)); diff --git a/test/multiset_test.cpp b/test/multiset_test.cpp index 9677a4bb..d91d60e0 100644 --- a/test/multiset_test.cpp +++ b/test/multiset_test.cpp @@ -39,7 +39,7 @@ struct rebinder , Option1 , Option2 > type; - BOOST_STATIC_ASSERT((key_type_tester::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((key_type_tester::value)); }; }; enum HookType diff --git a/test/nonhook_node.hpp b/test/nonhook_node.hpp index 7b1389e8..91c70689 100644 --- a/test/nonhook_node.hpp +++ b/test/nonhook_node.hpp @@ -19,7 +19,6 @@ #include -#include #include 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) { diff --git a/test/null_iterator_test.cpp b/test/null_iterator_test.cpp index 1905a656..b53bdf29 100644 --- a/test/null_iterator_test.cpp +++ b/test/null_iterator_test.cpp @@ -20,7 +20,6 @@ #include #include -#include #include #include @@ -42,14 +41,14 @@ static buffer_t buffer_0xFF; template 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 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(); } diff --git a/test/pack_options_test.cpp b/test/pack_options_test.cpp index 2df1c0fe..c0910d77 100644 --- a/test/pack_options_test.cpp +++ b/test/pack_options_test.cpp @@ -9,7 +9,6 @@ ////////////////////////////////////////////////////////////////////////////// #include #include -#include 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 >::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::type, my_pointer_type) typedef pack_options< empty_default, my_pointer >::type::my_pointer_type my_pointer_type; -BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same::value )); +BOOST_INTRUSIVE_STATIC_ASSERT(( boost::intrusive::detail::is_same::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 , my_pointer2 >::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::value )); -BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same::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::value )); +BOOST_INTRUSIVE_STATIC_ASSERT(( boost::intrusive::detail::is_same::value )); //test packing the default options leads to a default options type -BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same::type, default_options>::value )); +BOOST_INTRUSIVE_STATIC_ASSERT(( boost::intrusive::detail::is_same::type, default_options>::value )); int main() { diff --git a/test/pointer_traits_test.cpp b/test/pointer_traits_test.cpp index 73ea4f8c..70bf7c97 100644 --- a/test/pointer_traits_test.cpp +++ b/test/pointer_traits_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// #include -#include #include #include @@ -162,13 +161,13 @@ int main() int dummy; //Raw pointer - BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same::element_type, int>::value )); - BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same::pointer, int*>::value )); - BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same::difference_type, std::ptrdiff_t>::value )); - BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same::rebind_pointer::type , double*>::value )); BOOST_TEST(boost::intrusive::pointer_traits::pointer_to(dummy) == &dummy); @@ -177,13 +176,13 @@ int main() BOOST_TEST(boost::intrusive::pointer_traits:: dynamic_cast_from((B*)0) == 0); //Complete smart pointer - BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same >::element_type, int>::value )); - BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same >::pointer, CompleteSmartPtr >::value )); - BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same >::difference_type, char>::value )); - BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same >::rebind_pointer::type , CompleteSmartPtr >::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 >::element_type, int>::value )); - BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same >::pointer, SimpleSmartPtr >::value )); - BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same >::difference_type, std::ptrdiff_t>::value )); - BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same >::rebind_pointer::type , SimpleSmartPtr >::value )); diff --git a/test/scary_iterators_test.cpp b/test/scary_iterators_test.cpp index 69cd8b14..1701aa4a 100644 --- a/test/scary_iterators_test.cpp +++ b/test/scary_iterators_test.cpp @@ -19,7 +19,6 @@ #include #include #include -#include #include "smart_ptr.hpp" #include //std::greater/std::less @@ -87,227 +86,227 @@ int main() //////////// // list //////////// - BOOST_STATIC_ASSERT((!detail::is_same< list >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< list >::iterator , list >::const_iterator >::value)); //constant_time_size does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< list, constant_time_size >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< list, constant_time_size >::iterator , list, constant_time_size >::iterator >::value)); //void_pointer does change iterator - BOOST_STATIC_ASSERT((!detail::is_same< list >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< list >::iterator , list > >::iterator >::value)); //size_type does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< list, size_type >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< list, size_type >::iterator , list, size_type >::iterator >::value)); //////////// // slist //////////// - BOOST_STATIC_ASSERT((!detail::is_same< slist >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< slist >::iterator , slist >::const_iterator >::value)); //constant_time_size does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< slist, constant_time_size >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< slist, constant_time_size >::iterator , slist, constant_time_size >::iterator >::value)); //void_pointer does change iterator - BOOST_STATIC_ASSERT((!detail::is_same< slist >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< slist >::iterator , slist > >::iterator >::value)); //size_type does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< slist, size_type >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< slist, size_type >::iterator , slist, size_type >::iterator >::value)); //cache_last does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< slist, cache_last >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< slist, cache_last >::iterator , slist, cache_last >::iterator >::value)); //linear does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< slist, linear >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< slist, linear >::iterator , slist, linear >::iterator >::value)); //////////// // set //////////// - BOOST_STATIC_ASSERT((!detail::is_same< set >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< set >::iterator , set >::const_iterator >::value)); //constant_time_size does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< set, constant_time_size >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< set, constant_time_size >::iterator , set, constant_time_size >::iterator >::value)); //void_pointer does change iterator - BOOST_STATIC_ASSERT((!detail::is_same< set >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< set >::iterator , set > >::iterator >::value)); //size_type does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< set, size_type >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< set, size_type >::iterator , set, size_type >::iterator >::value)); //compare does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< set, compare< std::greater > > >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< set, compare< std::greater > > >::iterator , set, compare< std::less > > >::iterator >::value)); //////////// // avl_set //////////// - BOOST_STATIC_ASSERT((!detail::is_same< avl_set >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< avl_set >::iterator , avl_set >::const_iterator >::value)); //constant_time_size does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< avl_set, constant_time_size >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< avl_set, constant_time_size >::iterator , avl_set, constant_time_size >::iterator >::value)); //void_pointer does change iterator - BOOST_STATIC_ASSERT((!detail::is_same< avl_set >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< avl_set >::iterator , avl_set > >::iterator >::value)); //size_type does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< avl_set, size_type >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< avl_set, size_type >::iterator , avl_set, size_type >::iterator >::value)); //compare does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< avl_set, compare< std::greater > > >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< avl_set, compare< std::greater > > >::iterator , avl_set, compare< std::less > > >::iterator >::value)); //////////// // sg_set //////////// - BOOST_STATIC_ASSERT((!detail::is_same< sg_set >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< sg_set >::iterator , sg_set >::const_iterator >::value)); //void_pointer does change iterator - BOOST_STATIC_ASSERT((!detail::is_same< sg_set >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< sg_set >::iterator , sg_set > >::iterator >::value)); //size_type does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< sg_set, size_type >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< sg_set, size_type >::iterator , sg_set, size_type >::iterator >::value)); //compare does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< sg_set, compare< std::greater > > >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< sg_set, compare< std::greater > > >::iterator , sg_set, compare< std::less > > >::iterator >::value)); //floating_point does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< sg_set, floating_point >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< sg_set, floating_point >::iterator , sg_set, floating_point >::iterator >::value)); //////////// // bs_set //////////// - BOOST_STATIC_ASSERT((!detail::is_same< bs_set >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< bs_set >::iterator , bs_set >::const_iterator >::value)); //constant_time_size does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< bs_set, constant_time_size >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< bs_set, constant_time_size >::iterator , bs_set, constant_time_size >::iterator >::value)); //void_pointer does change iterator - BOOST_STATIC_ASSERT((!detail::is_same< bs_set >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< bs_set >::iterator , bs_set > >::iterator >::value)); //size_type does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< bs_set, size_type >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< bs_set, size_type >::iterator , bs_set, size_type >::iterator >::value)); //compare does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< bs_set, compare< std::greater > > >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< bs_set, compare< std::greater > > >::iterator , bs_set, compare< std::less > > >::iterator >::value)); //////////// // splay_set //////////// - BOOST_STATIC_ASSERT((!detail::is_same< splay_set >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< splay_set >::iterator , splay_set >::const_iterator >::value)); //constant_time_size does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< splay_set, constant_time_size >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< splay_set, constant_time_size >::iterator , splay_set, constant_time_size >::iterator >::value)); //void_pointer does change iterator - BOOST_STATIC_ASSERT((!detail::is_same< splay_set >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< splay_set >::iterator , splay_set > >::iterator >::value)); //size_type does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< splay_set, size_type >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< splay_set, size_type >::iterator , splay_set, size_type >::iterator >::value)); //compare does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< splay_set, compare< std::greater > > >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< splay_set, compare< std::greater > > >::iterator , splay_set, compare< std::less > > >::iterator >::value)); //////////// // treap_set //////////// - BOOST_STATIC_ASSERT((!detail::is_same< treap_set >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< treap_set >::iterator , treap_set >::const_iterator >::value)); //constant_time_size does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< treap_set, constant_time_size >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< treap_set, constant_time_size >::iterator , treap_set, constant_time_size >::iterator >::value)); //void_pointer does change iterator - BOOST_STATIC_ASSERT((!detail::is_same< treap_set >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< treap_set >::iterator , treap_set > >::iterator >::value)); //size_type does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< treap_set, size_type >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< treap_set, size_type >::iterator , treap_set, size_type >::iterator >::value)); //compare does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< treap_set, compare< std::greater > > >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< treap_set, compare< std::greater > > >::iterator , treap_set, compare< std::less > > >::iterator >::value)); //priority does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< treap_set >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< treap_set >::iterator , treap_set, priority< inverse_priority > > >::iterator >::value)); ////////////// // common tree ////////////// - BOOST_STATIC_ASSERT((detail::is_same< bs_set >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< bs_set >::iterator , sg_set >::iterator >::value)); - BOOST_STATIC_ASSERT((detail::is_same< bs_set >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< bs_set >::iterator , treap_set >::iterator >::value)); - BOOST_STATIC_ASSERT((detail::is_same< bs_set >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< bs_set >::iterator , splay_set >::iterator >::value)); //////////// // unordered_set //////////// - BOOST_STATIC_ASSERT((!detail::is_same< unordered_set >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< unordered_set >::iterator , unordered_set >::const_iterator >::value)); //constant_time_size does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< unordered_set, constant_time_size >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< unordered_set, constant_time_size >::iterator , unordered_set, constant_time_size >::iterator >::value)); //void_pointer does change iterator - BOOST_STATIC_ASSERT((!detail::is_same< unordered_set >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((!detail::is_same< unordered_set >::iterator , unordered_set > >::iterator >::value)); //size_type does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< unordered_set, size_type >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< unordered_set, size_type >::iterator , unordered_set, size_type >::iterator >::value)); //hash does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< unordered_set >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< unordered_set >::iterator , unordered_set, hash< inverse_hash > > >::iterator >::value)); //equal does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< unordered_set >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< unordered_set >::iterator , unordered_set, equal< alternative_equal > > >::iterator >::value)); //power_2_buckets does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< unordered_set >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< unordered_set >::iterator , unordered_set, power_2_buckets >::iterator >::value)); //cache_begin does not change iterator - BOOST_STATIC_ASSERT((detail::is_same< unordered_set >::iterator + BOOST_INTRUSIVE_STATIC_ASSERT((detail::is_same< unordered_set >::iterator , unordered_set, cache_begin >::iterator >::value)); return 0; diff --git a/test/set_test.cpp b/test/set_test.cpp index 179e3e18..6104f824 100644 --- a/test/set_test.cpp +++ b/test/set_test.cpp @@ -39,7 +39,7 @@ struct rebinder , Option1 , Option2 > type; - BOOST_STATIC_ASSERT((key_type_tester::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((key_type_tester::value)); }; }; diff --git a/test/sg_multiset_test.cpp b/test/sg_multiset_test.cpp index 2a71cace..3869d25d 100644 --- a/test/sg_multiset_test.cpp +++ b/test/sg_multiset_test.cpp @@ -38,7 +38,7 @@ struct rebinder , Option1 , Option2 > type; - BOOST_STATIC_ASSERT((key_type_tester::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((key_type_tester::value)); }; }; diff --git a/test/sg_set_test.cpp b/test/sg_set_test.cpp index a115844f..c14a7425 100644 --- a/test/sg_set_test.cpp +++ b/test/sg_set_test.cpp @@ -38,7 +38,7 @@ struct rebinder , Option1 , Option2 > type; - BOOST_STATIC_ASSERT((key_type_tester::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((key_type_tester::value)); }; }; diff --git a/test/splay_multiset_test.cpp b/test/splay_multiset_test.cpp index e3809a61..ec9a0f20 100644 --- a/test/splay_multiset_test.cpp +++ b/test/splay_multiset_test.cpp @@ -38,7 +38,7 @@ struct rebinder , Option1 , Option2 > type; - BOOST_STATIC_ASSERT((key_type_tester::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((key_type_tester::value)); }; }; diff --git a/test/splay_set_test.cpp b/test/splay_set_test.cpp index 3020e2e2..2f591df2 100644 --- a/test/splay_set_test.cpp +++ b/test/splay_set_test.cpp @@ -38,7 +38,7 @@ struct rebinder , Option1 , Option2 > type; - BOOST_STATIC_ASSERT((key_type_tester::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((key_type_tester::value)); }; }; diff --git a/test/test_common.hpp b/test/test_common.hpp index 8c7ae489..69c9ff69 100644 --- a/test/test_common.hpp +++ b/test/test_common.hpp @@ -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 > >::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 >::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 struct key_type_tester { - 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; diff --git a/test/test_container.hpp b/test/test_container.hpp index ca258b45..42677bde 100644 --- a/test/test_container.hpp +++ b/test/test_container.hpp @@ -20,7 +20,6 @@ #include #include #include -#include #include "iterator_test.hpp" #include diff --git a/test/treap_multiset_test.cpp b/test/treap_multiset_test.cpp index 0fc4ff4c..9a107551 100644 --- a/test/treap_multiset_test.cpp +++ b/test/treap_multiset_test.cpp @@ -40,7 +40,7 @@ struct rebinder , Option1 , Option2 > type; - BOOST_STATIC_ASSERT((key_type_tester::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((key_type_tester::value)); }; }; diff --git a/test/treap_set_test.cpp b/test/treap_set_test.cpp index 10767b42..b4a85552 100644 --- a/test/treap_set_test.cpp +++ b/test/treap_set_test.cpp @@ -39,7 +39,7 @@ struct rebinder , Option1 , Option2 > type; - BOOST_STATIC_ASSERT((key_type_tester::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((key_type_tester::value)); }; }; diff --git a/test/unordered_multiset_test.cpp b/test/unordered_multiset_test.cpp index 0cd274e8..1067b906 100644 --- a/test/unordered_multiset_test.cpp +++ b/test/unordered_multiset_test.cpp @@ -53,8 +53,8 @@ struct rebinder , Option1 , Option2 > type; - BOOST_STATIC_ASSERT((key_type_tester::value)); - BOOST_STATIC_ASSERT((boost::intrusive::test::is_multikey_true::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((key_type_tester::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((boost::intrusive::test::is_multikey_true::value)); }; }; diff --git a/test/unordered_set_test.cpp b/test/unordered_set_test.cpp index baface0d..d4bab707 100644 --- a/test/unordered_set_test.cpp +++ b/test/unordered_set_test.cpp @@ -51,8 +51,8 @@ struct rebinder , Option1 , Option2 > type; - BOOST_STATIC_ASSERT((key_type_tester::value)); - BOOST_STATIC_ASSERT((!boost::intrusive::test::is_multikey_true::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((key_type_tester::value)); + BOOST_INTRUSIVE_STATIC_ASSERT((!boost::intrusive::test::is_multikey_true::value)); }; };