forked from boostorg/intrusive
Reimplemented remove family for lists using new stable_partition algorithm. This allows less code duplication between lists with different options (constant_time_size, cache_list, safe/non-safe hooks, etc.).
This commit is contained in:
1 parent
1afec2c716
commit
0a03aa599a
10 files changed
+257
-41
No files matched your search
@@ -159,6 +159,26 @@ void test_slist< List_Type, Value_Container >
|
||||
int init_values [] = { 1, 3, 5 };
|
||||
TEST_INTRUSIVE_SEQUENCE( init_values, list.begin() );
|
||||
}
|
||||
{
|
||||
list_type list(values.begin(), values.end());
|
||||
list.remove_if(is_odd());
|
||||
int init_values [] = { 2, 4 };
|
||||
TEST_INTRUSIVE_SEQUENCE( init_values, list.begin() );
|
||||
}
|
||||
{
|
||||
list_type list(values.begin(), values.end());
|
||||
list.remove_and_dispose_if(is_even(), test::empty_disposer());
|
||||
int init_values [] = { 1, 3, 5 };
|
||||
typename list_type::iterator i = list.begin(), e = list.end();
|
||||
TEST_INTRUSIVE_SEQUENCE( init_values, list.begin() );
|
||||
}
|
||||
{
|
||||
list_type list(values.begin(), values.end());
|
||||
list.remove_and_dispose_if(is_odd(), test::empty_disposer());
|
||||
int init_values [] = { 2, 4 };
|
||||
typename list_type::iterator i = list.begin(), e = list.end();
|
||||
TEST_INTRUSIVE_SEQUENCE( init_values, list.begin() );
|
||||
}
|
||||
{
|
||||
Value_Container values2(values);
|
||||
list_type list(values.begin(), values.end());
|
||||
|
||||
Reference in new issue
Block a user