Changes for Boost.1.39

[SVN r52035]
This commit is contained in:
Ion Gaztañaga
2009-03-28 14:41:39 +00:00
parent 3f4c4f60e5
commit f0938f6338
14 changed files with 55 additions and 16 deletions

View File

@@ -1280,7 +1280,9 @@ And they also can receive additional options:
provides a bucket length that is not power of two. provides a bucket length that is not power of two.
Default: `power_2_buckets<false>`. Default: `power_2_buckets<false>`.
* [*`cache_begin<bool Enabled>`]: Due to its internal structure, finding the first * [*`cache_begin<bool Enabled>`]:
[*Note: this option is not compatible with `auto_unlink` hooks].
Due to its internal structure, finding the first
element of an unordered container (`begin()` operation) is element of an unordered container (`begin()` operation) is
amortized constant-time. It's possible to speed up `begin()` and other operations amortized constant-time. It's possible to speed up `begin()` and other operations
related to it (like `clear()`) if the container caches internally the position related to it (like `clear()`) if the container caches internally the position
@@ -3701,6 +3703,20 @@ all the objects to be inserted in intrusive containers in containers like `std::
[section:release_notes Release Notes] [section:release_notes Release Notes]
[section:release_notes_boost_1_39_00 Boost 1.39 Release]
* Optimized `list::merge` and `slist::merge`
* `list::sort` and `slist::sort` are now stable.
* Fixed bugs
[@https://svn.boost.org/trac/boost/ticket/2689 #2689],
[@https://svn.boost.org/trac/boost/ticket/2755 #2755],
[@https://svn.boost.org/trac/boost/ticket/2786 #2786],
[@https://svn.boost.org/trac/boost/ticket/2807 #2807],
[@https://svn.boost.org/trac/boost/ticket/2810 #2810],
[@https://svn.boost.org/trac/boost/ticket/2862 #2862].
[endsect]
[section:release_notes_boost_1_38_00 Boost 1.38 Release] [section:release_notes_boost_1_38_00 Boost 1.38 Release]
* New treap-based containers: treap, treap_set, treap_multiset. * New treap-based containers: treap, treap_set, treap_multiset.

View File

@@ -34,7 +34,7 @@ int main()
typedef any_to_slist_hook < base_hook< any_base_hook<> > > BaseSlistOption; typedef any_to_slist_hook < base_hook< any_base_hook<> > > BaseSlistOption;
typedef slist<MyClass, BaseSlistOption> BaseSList; typedef slist<MyClass, BaseSlistOption> BaseSList;
//Define a member hook option that converts any_base_hook to a list hook //Define a member hook option that converts any_member_hook to a list hook
typedef any_to_list_hook< member_hook typedef any_to_list_hook< member_hook
< MyClass, any_member_hook<>, &MyClass::member_hook_> > MemberListOption; < MyClass, any_member_hook<>, &MyClass::member_hook_> > MemberListOption;
typedef list<MyClass, MemberListOption> MemberList; typedef list<MyClass, MemberListOption> MemberList;

View File

@@ -27,7 +27,7 @@
MinimalRebuild="TRUE" MinimalRebuild="TRUE"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="5" RuntimeLibrary="5"
DisableLanguageExtensions="FALSE" DisableLanguageExtensions="TRUE"
TreatWChar_tAsBuiltInType="TRUE" TreatWChar_tAsBuiltInType="TRUE"
ForceConformanceInForLoopScope="TRUE" ForceConformanceInForLoopScope="TRUE"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"

View File

@@ -27,7 +27,7 @@
MinimalRebuild="TRUE" MinimalRebuild="TRUE"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="5" RuntimeLibrary="5"
DisableLanguageExtensions="FALSE" DisableLanguageExtensions="TRUE"
TreatWChar_tAsBuiltInType="TRUE" TreatWChar_tAsBuiltInType="TRUE"
ForceConformanceInForLoopScope="TRUE" ForceConformanceInForLoopScope="TRUE"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"

View File

@@ -27,7 +27,7 @@
MinimalRebuild="TRUE" MinimalRebuild="TRUE"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="5" RuntimeLibrary="5"
DisableLanguageExtensions="FALSE" DisableLanguageExtensions="TRUE"
TreatWChar_tAsBuiltInType="TRUE" TreatWChar_tAsBuiltInType="TRUE"
ForceConformanceInForLoopScope="TRUE" ForceConformanceInForLoopScope="TRUE"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"

View File

@@ -27,7 +27,7 @@
MinimalRebuild="TRUE" MinimalRebuild="TRUE"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="5" RuntimeLibrary="5"
DisableLanguageExtensions="FALSE" DisableLanguageExtensions="TRUE"
TreatWChar_tAsBuiltInType="TRUE" TreatWChar_tAsBuiltInType="TRUE"
ForceConformanceInForLoopScope="TRUE" ForceConformanceInForLoopScope="TRUE"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"

View File

@@ -27,7 +27,7 @@
MinimalRebuild="TRUE" MinimalRebuild="TRUE"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="5" RuntimeLibrary="5"
DisableLanguageExtensions="FALSE" DisableLanguageExtensions="TRUE"
TreatWChar_tAsBuiltInType="TRUE" TreatWChar_tAsBuiltInType="TRUE"
ForceConformanceInForLoopScope="TRUE" ForceConformanceInForLoopScope="TRUE"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"

View File

@@ -27,7 +27,7 @@
MinimalRebuild="TRUE" MinimalRebuild="TRUE"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="5" RuntimeLibrary="5"
DisableLanguageExtensions="FALSE" DisableLanguageExtensions="TRUE"
TreatWChar_tAsBuiltInType="TRUE" TreatWChar_tAsBuiltInType="TRUE"
ForceConformanceInForLoopScope="TRUE" ForceConformanceInForLoopScope="TRUE"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"

View File

@@ -27,7 +27,7 @@
MinimalRebuild="TRUE" MinimalRebuild="TRUE"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="5" RuntimeLibrary="5"
DisableLanguageExtensions="FALSE" DisableLanguageExtensions="TRUE"
TreatWChar_tAsBuiltInType="TRUE" TreatWChar_tAsBuiltInType="TRUE"
ForceConformanceInForLoopScope="TRUE" ForceConformanceInForLoopScope="TRUE"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"

View File

@@ -24,3 +24,5 @@
-> revise strong exception safety concepts for treap::erase functions. -> revise strong exception safety concepts for treap::erase functions.
What happens with range deletions? What happens with range deletions?
-> Assure stable order for optimize_multikey and inverse order otherwise -> Assure stable order for optimize_multikey and inverse order otherwise
-> linear slist's splice_after(..., slist &x) can be optimized if *this is empty
-> optimize slist::merge like list::merge

View File

@@ -27,7 +27,7 @@
MinimalRebuild="TRUE" MinimalRebuild="TRUE"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="5" RuntimeLibrary="5"
DisableLanguageExtensions="FALSE" DisableLanguageExtensions="TRUE"
TreatWChar_tAsBuiltInType="TRUE" TreatWChar_tAsBuiltInType="TRUE"
ForceConformanceInForLoopScope="TRUE" ForceConformanceInForLoopScope="TRUE"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"

View File

@@ -417,6 +417,28 @@ void test_slist<ValueTraits, Linear, CacheLast>
{ int init_values [] = { 2 }; { int init_values [] = { 2 };
TEST_INTRUSIVE_SEQUENCE( init_values, testlist2.begin() ); } TEST_INTRUSIVE_SEQUENCE( init_values, testlist2.begin() ); }
} }
{ //Now test swap when testlist2 is empty
list_type testlist1 (&values[0], &values[0] + 2);
list_type testlist2;
testlist1.swap(testlist2);
BOOST_TEST (testlist1.empty());
{ int init_values [] = { 1, 2 };
TEST_INTRUSIVE_SEQUENCE( init_values, testlist2.begin() ); }
}
{ //Now test swap when testlist1 is empty
list_type testlist2 (&values[0], &values[0] + 2);
list_type testlist1;
testlist1.swap(testlist2);
BOOST_TEST (testlist2.empty());
{ int init_values [] = { 1, 2 };
TEST_INTRUSIVE_SEQUENCE( init_values, testlist1.begin() ); }
}
{ //Now test when both are empty
list_type testlist1, testlist2;
testlist2.swap(testlist1);
BOOST_TEST (testlist1.empty() && testlist2.empty());
}
if(!list_type::linear) if(!list_type::linear)
{ {
list_type testlist1 (&values[0], &values[0] + 2); list_type testlist1 (&values[0], &values[0] + 2);

View File

@@ -719,7 +719,6 @@ class test_main_template
, false , false
, Incremental , Incremental
>::test_all(data); >::test_all(data);
return 0; return 0;
} }
}; };
@@ -740,7 +739,7 @@ class test_main_template<VoidPointer, false, Incremental>
< value_type < value_type
, typename hooks<VoidPointer>::base_hook_type , typename hooks<VoidPointer>::base_hook_type
>::type >::type
, true , false
, false , false
, Incremental , Incremental
>::test_all(data); >::test_all(data);
@@ -752,7 +751,7 @@ class test_main_template<VoidPointer, false, Incremental>
, &value_type::node_ , &value_type::node_
> >
>::type >::type
, false , true
, false , false
, Incremental , Incremental
>::test_all(data); >::test_all(data);
@@ -761,8 +760,8 @@ class test_main_template<VoidPointer, false, Incremental>
< value_type < value_type
, typename hooks<VoidPointer>::auto_base_hook_type , typename hooks<VoidPointer>::auto_base_hook_type
>::type >::type
, true , false
, true , false
, Incremental , Incremental
>::test_all(data); >::test_all(data);

View File

@@ -623,7 +623,7 @@ class test_main_template<VoidPointer, false, incremental>
< value_type < value_type
, typename hooks<VoidPointer>::auto_base_hook_type , typename hooks<VoidPointer>::auto_base_hook_type
>::type >::type
, true , false
, true , true
, incremental , incremental
>::test_all(data); >::test_all(data);