From f0938f63388119988ae8c74cb9182904d87b2c5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Sat, 28 Mar 2009 14:41:39 +0000 Subject: [PATCH] Changes for Boost.1.39 [SVN r52035] --- doc/intrusive.qbk | 18 ++++++++++++++- example/doc_any_hook.cpp | 2 +- proj/vc7ide/any_test/any_test.vcproj | 2 +- .../custom_bucket_traits.vcproj | 2 +- proj/vc7ide/default_hook/default_hook.vcproj | 2 +- .../external_value_traits.vcproj | 2 +- proj/vc7ide/list/list.vcproj | 2 +- .../make_functions/make_functions.vcproj | 2 +- .../stateful_value_traits.vcproj | 2 +- proj/vc7ide/to-do.txt | 2 ++ proj/vc7ide/virtual_base/virtual_base.vcproj | 2 +- test/slist_test.cpp | 22 +++++++++++++++++++ test/unordered_multiset_test.cpp | 9 ++++---- test/unordered_set_test.cpp | 2 +- 14 files changed, 55 insertions(+), 16 deletions(-) diff --git a/doc/intrusive.qbk b/doc/intrusive.qbk index b8960a4..69f11cd 100644 --- a/doc/intrusive.qbk +++ b/doc/intrusive.qbk @@ -1280,7 +1280,9 @@ And they also can receive additional options: provides a bucket length that is not power of two. Default: `power_2_buckets`. -* [*`cache_begin`]: Due to its internal structure, finding the first +* [*`cache_begin`]: + [*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 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 @@ -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_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] * New treap-based containers: treap, treap_set, treap_multiset. diff --git a/example/doc_any_hook.cpp b/example/doc_any_hook.cpp index 15220dc..11991aa 100644 --- a/example/doc_any_hook.cpp +++ b/example/doc_any_hook.cpp @@ -34,7 +34,7 @@ int main() typedef any_to_slist_hook < base_hook< any_base_hook<> > > BaseSlistOption; typedef slist 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 < MyClass, any_member_hook<>, &MyClass::member_hook_> > MemberListOption; typedef list MemberList; diff --git a/proj/vc7ide/any_test/any_test.vcproj b/proj/vc7ide/any_test/any_test.vcproj index b053349..e99365d 100644 --- a/proj/vc7ide/any_test/any_test.vcproj +++ b/proj/vc7ide/any_test/any_test.vcproj @@ -27,7 +27,7 @@ MinimalRebuild="TRUE" BasicRuntimeChecks="3" RuntimeLibrary="5" - DisableLanguageExtensions="FALSE" + DisableLanguageExtensions="TRUE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" UsePrecompiledHeader="0" diff --git a/proj/vc7ide/custom_bucket_traits/custom_bucket_traits.vcproj b/proj/vc7ide/custom_bucket_traits/custom_bucket_traits.vcproj index a396174..2c873b8 100644 --- a/proj/vc7ide/custom_bucket_traits/custom_bucket_traits.vcproj +++ b/proj/vc7ide/custom_bucket_traits/custom_bucket_traits.vcproj @@ -27,7 +27,7 @@ MinimalRebuild="TRUE" BasicRuntimeChecks="3" RuntimeLibrary="5" - DisableLanguageExtensions="FALSE" + DisableLanguageExtensions="TRUE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" UsePrecompiledHeader="0" diff --git a/proj/vc7ide/default_hook/default_hook.vcproj b/proj/vc7ide/default_hook/default_hook.vcproj index 9c26fb7..e6c1b7f 100644 --- a/proj/vc7ide/default_hook/default_hook.vcproj +++ b/proj/vc7ide/default_hook/default_hook.vcproj @@ -27,7 +27,7 @@ MinimalRebuild="TRUE" BasicRuntimeChecks="3" RuntimeLibrary="5" - DisableLanguageExtensions="FALSE" + DisableLanguageExtensions="TRUE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" UsePrecompiledHeader="0" diff --git a/proj/vc7ide/external_value_traits/external_value_traits.vcproj b/proj/vc7ide/external_value_traits/external_value_traits.vcproj index 87ebd51..6f0b875 100644 --- a/proj/vc7ide/external_value_traits/external_value_traits.vcproj +++ b/proj/vc7ide/external_value_traits/external_value_traits.vcproj @@ -27,7 +27,7 @@ MinimalRebuild="TRUE" BasicRuntimeChecks="3" RuntimeLibrary="5" - DisableLanguageExtensions="FALSE" + DisableLanguageExtensions="TRUE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" UsePrecompiledHeader="0" diff --git a/proj/vc7ide/list/list.vcproj b/proj/vc7ide/list/list.vcproj index e5e510b..8f5817b 100644 --- a/proj/vc7ide/list/list.vcproj +++ b/proj/vc7ide/list/list.vcproj @@ -27,7 +27,7 @@ MinimalRebuild="TRUE" BasicRuntimeChecks="3" RuntimeLibrary="5" - DisableLanguageExtensions="FALSE" + DisableLanguageExtensions="TRUE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" UsePrecompiledHeader="0" diff --git a/proj/vc7ide/make_functions/make_functions.vcproj b/proj/vc7ide/make_functions/make_functions.vcproj index cf926ce..572aa02 100644 --- a/proj/vc7ide/make_functions/make_functions.vcproj +++ b/proj/vc7ide/make_functions/make_functions.vcproj @@ -27,7 +27,7 @@ MinimalRebuild="TRUE" BasicRuntimeChecks="3" RuntimeLibrary="5" - DisableLanguageExtensions="FALSE" + DisableLanguageExtensions="TRUE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" UsePrecompiledHeader="0" diff --git a/proj/vc7ide/stateful_value_traits/stateful_value_traits.vcproj b/proj/vc7ide/stateful_value_traits/stateful_value_traits.vcproj index 72cbe3b..a5b898e 100644 --- a/proj/vc7ide/stateful_value_traits/stateful_value_traits.vcproj +++ b/proj/vc7ide/stateful_value_traits/stateful_value_traits.vcproj @@ -27,7 +27,7 @@ MinimalRebuild="TRUE" BasicRuntimeChecks="3" RuntimeLibrary="5" - DisableLanguageExtensions="FALSE" + DisableLanguageExtensions="TRUE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" UsePrecompiledHeader="0" diff --git a/proj/vc7ide/to-do.txt b/proj/vc7ide/to-do.txt index f62414d..534314c 100644 --- a/proj/vc7ide/to-do.txt +++ b/proj/vc7ide/to-do.txt @@ -24,3 +24,5 @@ -> revise strong exception safety concepts for treap::erase functions. What happens with range deletions? -> 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 diff --git a/proj/vc7ide/virtual_base/virtual_base.vcproj b/proj/vc7ide/virtual_base/virtual_base.vcproj index b5f6f66..7d87163 100644 --- a/proj/vc7ide/virtual_base/virtual_base.vcproj +++ b/proj/vc7ide/virtual_base/virtual_base.vcproj @@ -27,7 +27,7 @@ MinimalRebuild="TRUE" BasicRuntimeChecks="3" RuntimeLibrary="5" - DisableLanguageExtensions="FALSE" + DisableLanguageExtensions="TRUE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" UsePrecompiledHeader="0" diff --git a/test/slist_test.cpp b/test/slist_test.cpp index 569c1ae..ff0bd7f 100644 --- a/test/slist_test.cpp +++ b/test/slist_test.cpp @@ -417,6 +417,28 @@ void test_slist { int init_values [] = { 2 }; 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) { list_type testlist1 (&values[0], &values[0] + 2); diff --git a/test/unordered_multiset_test.cpp b/test/unordered_multiset_test.cpp index 868d264..206605d 100644 --- a/test/unordered_multiset_test.cpp +++ b/test/unordered_multiset_test.cpp @@ -719,7 +719,6 @@ class test_main_template , false , Incremental >::test_all(data); - return 0; } }; @@ -740,7 +739,7 @@ class test_main_template < value_type , typename hooks::base_hook_type >::type - , true + , false , false , Incremental >::test_all(data); @@ -752,7 +751,7 @@ class test_main_template , &value_type::node_ > >::type - , false + , true , false , Incremental >::test_all(data); @@ -761,8 +760,8 @@ class test_main_template < value_type , typename hooks::auto_base_hook_type >::type - , true - , true + , false + , false , Incremental >::test_all(data); diff --git a/test/unordered_set_test.cpp b/test/unordered_set_test.cpp index b84414b..f6b5e48 100644 --- a/test/unordered_set_test.cpp +++ b/test/unordered_set_test.cpp @@ -623,7 +623,7 @@ class test_main_template < value_type , typename hooks::auto_base_hook_type >::type - , true + , false , true , incremental >::test_all(data);