Use BOOST_INTRUSIVE_STATIC_ASSERT instead of BOOST_STATIC_ASSERT to reduce library level and weight.

This commit is contained in:
Ion Gaztañaga committed 2024-01-02 01:42:05 +01:00
1 parent 60def75ac2
commit e84e9b7b2e
48 files changed
+240 -246

No files matched your search

+1 -1
View File
@@ -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));
};
};
+1 -1
View File
@@ -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));
};
};
+1 -1
View File
@@ -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));
};
};
+1 -1
View File
@@ -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));
};
};
+1 -1
View File
@@ -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);
}
};
-1
View File
@@ -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;
+8 -9
View File
@@ -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;
+32 -33
View File
@@ -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);
}
+12 -13
View File
@@ -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));
+1 -1
View File
@@ -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
+1 -2
View File
@@ -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)
{
+2 -3
View File
@@ -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();
}
+7 -8
View File
@@ -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()
{
+12 -13
View File
@@ -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 ));
+52 -53
View File
@@ -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;
+1 -1
View File
@@ -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));
};
};
+1 -1
View File
@@ -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));
};
};
+1 -1
View File
@@ -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));
};
};
+1 -1
View File
@@ -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));
};
};
+1 -1
View File
@@ -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));
};
};
+6 -6
View File
@@ -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;
-1
View File
@@ -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>
+1 -1
View File
@@ -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));
};
};
+1 -1
View File
@@ -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));
};
};
+2 -2
View File
@@ -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));
};
};
+2 -2
View File
@@ -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));
};
};