Added support for node and value pointers non-convertible from raw references

This commit is contained in:
Ion Gaztañaga committed 2014-06-12 11:49:42 +02:00
1 parent 4390889bf0
commit 563eca32de
48 files changed
+1203 -1267

No files matched your search

+9 -9
View File
@@ -191,7 +191,7 @@ class test_main_template<VoidPointer, false, Default_Holder>
};
// container generator which ignores further parametrization, except for compare option
template < typename Value_Traits, bool Constant_Time_Size, typename Header_Holder >
template < typename Value_Traits, bool ConstantTimeSize, typename HeaderHolder >
struct Get_Preset_Container
{
template < class
@@ -208,26 +208,26 @@ struct Get_Preset_Container
typedef boost::intrusive::set< typename Value_Traits::value_type,
value_traits< Value_Traits >,
constant_time_size< Constant_Time_Size >,
constant_time_size< ConstantTimeSize >,
compare< compare_option >,
header_holder_type< Header_Holder >
header_holder_type< HeaderHolder >
> type;
};
};
template < bool Constant_Time_Size >
template < bool ConstantTimeSize >
struct test_main_template_bptr
{
void operator () ()
{
typedef BPtr_Value value_type;
typedef BPtr_Value_Traits< RBTree_BPtr_Node_Traits > value_traits;
typedef Bounded_Allocator< value_type > allocator_type;
typedef bounded_allocator< value_type > allocator_type;
allocator_type::init();
test::test_generic_set< value_traits,
Get_Preset_Container< value_traits, Constant_Time_Size,
Bounded_Pointer_Holder< value_type >
Get_Preset_Container< value_traits, ConstantTimeSize,
bounded_pointer_holder< value_type >
>::template GetContainer
>::test_all();
assert(allocator_type::is_clear());
@@ -235,14 +235,14 @@ struct test_main_template_bptr
}
};
int main( int, char* [] )
int main()
{
// test (plain/smart pointers) x (nonconst/const size) x (void node allocator)
test_main_template<void*, false, true>()();
test_main_template<boost::intrusive::smart_ptr<void>, false, true>()();
test_main_template<void*, true, true>()();
test_main_template<boost::intrusive::smart_ptr<void>, true, true>()();
// test (plain pointers) x (nonconst/const size) x (standard node allocator)
//test (plain pointers) x (nonconst/const size) x (standard node allocator)
test_main_template<void*, false, false>()();
test_main_template<void*, true, false>()();
// test (bounded pointers) x (nonconst/const size) x (special node allocator)