From af7d196d355f72b68f05abc31d3ae818dfaaa355 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Thu, 25 Jun 2009 16:25:34 +0000 Subject: [PATCH] Boost 1.40 changes [SVN r54338] --- doc/interprocess.qbk | 20 +++++- proj/vc7ide/Interprocess.sln | 136 ++++++++++++++++++++++++++++++++--- test/vectorstream_test.cpp | 52 ++++++++++++-- 3 files changed, 193 insertions(+), 15 deletions(-) diff --git a/doc/interprocess.qbk b/doc/interprocess.qbk index 53faae4..9a2f2a5 100644 --- a/doc/interprocess.qbk +++ b/doc/interprocess.qbk @@ -1297,10 +1297,10 @@ region: A mutex can also be [*recursive] or [*non-recursive]: -* Recursive mutexes can be locked several types by the same thread. To fully unlock the - mutex, the thread has two unlock the mutex the same times it has locked it. +* Recursive mutexes can be locked several times by the same thread. To fully unlock the + mutex, the thread has to unlock the mutex the same times it has locked it. -* Non-recursive mutexes can't be locked several types by the same thread. If a mutex +* Non-recursive mutexes can't be locked several times by the same thread. If a mutex is locked twice by a thread, the result is undefined, it might throw an error or the thread could be blocked forever. @@ -6534,6 +6534,20 @@ warranty. [section:release_notes Release Notes] +[section:release_notes_boost_1_40_00 Boost 1.40 Release] + +* Windows shared memory is created in Shared Documents folder so that it can be shared + between services and processes +* Fixed bugs + [@https://svn.boost.org/trac/boost/ticket/2967 #2967], + [@https://svn.boost.org/trac/boost/ticket/2973 #2973], + [@https://svn.boost.org/trac/boost/ticket/2992 #2992], + [@https://svn.boost.org/trac/boost/ticket/3138 #3138], + [@https://svn.boost.org/trac/boost/ticket/3166 #3166], + [@https://svn.boost.org/trac/boost/ticket/3205 #3205]. + +[endsect] + [section:release_notes_boost_1_39_00 Boost 1.39 Release] * Added experimental `stable_vector` container. diff --git a/proj/vc7ide/Interprocess.sln b/proj/vc7ide/Interprocess.sln index 190a1af..bc16161 100644 --- a/proj/vc7ide/Interprocess.sln +++ b/proj/vc7ide/Interprocess.sln @@ -367,10 +367,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_move_containers", "doc_ ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_named_conditionA", "doc_named_conditionA.vcproj", "{58EB1CB3-1354-364E-12F2-154356612054}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "string_test", "string_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D4A792607}" ProjectSection(ProjectDependencies) = postProject EndProjectSection @@ -379,6 +375,70 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tree_test", "tree_test.vcpr ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vectorstream_test", "vectorstream_test.vcproj", "{58CCE183-6032-12FE-A4F7-BA893A767601}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "named_upgradable_mutex_test", "named_upgradable_mutex.vcproj", "{48C1FBE8-F7A4-0961-48FE-7D93A63B0A04}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_named_mutex", "doc_named_mutex.vcproj", "{58C181B3-9516-463E-2F12-122155400054}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_windows_shared_memory2", "doc_windows_shared_memory2.vcproj", "{5E1D6C83-31DE-4F6F-6132-87A9FB663041}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "flat_map_index_allocation_test", "flat_map_index_allocation_test.vcproj", "{51D8E9C3-2D65-48FE-3AA7-7922C0E36329}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shared_memory_test", "shared_memory_test.vcproj", "{5E2838CC-0916-8F4E-A4F7-93506BA0D310}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shared_ptr_test", "shared_ptr_test.vcproj", "{5371C383-6092-1238-A877-BAEB37867609}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "slist_test", "slist_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792608}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unique_ptr_test", "unique_ptr_test.vcproj", "{571C3383-6092-A877-1238-B3786BAE7605}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "upgradable_mutex_test", "upgradable_mutex.vcproj", "{4E88C1C2-0961-F7A4-F48E-A6A7D3B06004}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "user_buffer_test", "user_buffer_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792603}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vector_test", "vector_test.vcproj", "{5CE11C83-096A-84FE-4FA2-D3A6BA792002}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iset_index_allocation_test", "iset_index_allocation_test.vcproj", "{58BD1CC3-6972-F3F7-84BE-0DB736035922}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iunordered_set_index_allocation_test", "iunordered_set_index_allocation_test.vcproj", "{5BD1C7C3-3F7F-6972-84BE-B731D9236035}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map_index_allocation_test", "map_index_allocation_test.vcproj", "{588CCD13-2962-83FE-F4B7-92230DB73629}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "named_condition_test", "named_condition_test.vcproj", "{58CC2563-6092-48FE-FAF7-BA046A792658}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject Global GlobalSection(SolutionConfiguration) = preSolution Debug = Debug @@ -753,10 +813,6 @@ Global {58C1B183-0296-EA42-EF04-005120054104}.Debug.Build.0 = Debug|Win32 {58C1B183-0296-EA42-EF04-005120054104}.Release.ActiveCfg = Release|Win32 {58C1B183-0296-EA42-EF04-005120054104}.Release.Build.0 = Release|Win32 - {58EB1CB3-1354-364E-12F2-154356612054}.Debug.ActiveCfg = Debug|Win32 - {58EB1CB3-1354-364E-12F2-154356612054}.Debug.Build.0 = Debug|Win32 - {58EB1CB3-1354-364E-12F2-154356612054}.Release.ActiveCfg = Release|Win32 - {58EB1CB3-1354-364E-12F2-154356612054}.Release.Build.0 = Release|Win32 {58CCE183-6092-48FE-A4F7-BA0D4A792607}.Debug.ActiveCfg = Debug|Win32 {58CCE183-6092-48FE-A4F7-BA0D4A792607}.Debug.Build.0 = Debug|Win32 {58CCE183-6092-48FE-A4F7-BA0D4A792607}.Release.ActiveCfg = Release|Win32 @@ -765,6 +821,70 @@ Global {58CCE183-6092-48FE-A4F7-BA0D3A792606}.Debug.Build.0 = Debug|Win32 {58CCE183-6092-48FE-A4F7-BA0D3A792606}.Release.ActiveCfg = Release|Win32 {58CCE183-6092-48FE-A4F7-BA0D3A792606}.Release.Build.0 = Release|Win32 + {58CCE183-6032-12FE-A4F7-BA893A767601}.Debug.ActiveCfg = Debug|Win32 + {58CCE183-6032-12FE-A4F7-BA893A767601}.Debug.Build.0 = Debug|Win32 + {58CCE183-6032-12FE-A4F7-BA893A767601}.Release.ActiveCfg = Release|Win32 + {58CCE183-6032-12FE-A4F7-BA893A767601}.Release.Build.0 = Release|Win32 + {48C1FBE8-F7A4-0961-48FE-7D93A63B0A04}.Debug.ActiveCfg = Debug|Win32 + {48C1FBE8-F7A4-0961-48FE-7D93A63B0A04}.Debug.Build.0 = Debug|Win32 + {48C1FBE8-F7A4-0961-48FE-7D93A63B0A04}.Release.ActiveCfg = Release|Win32 + {48C1FBE8-F7A4-0961-48FE-7D93A63B0A04}.Release.Build.0 = Release|Win32 + {58C181B3-9516-463E-2F12-122155400054}.Debug.ActiveCfg = Debug|Win32 + {58C181B3-9516-463E-2F12-122155400054}.Debug.Build.0 = Debug|Win32 + {58C181B3-9516-463E-2F12-122155400054}.Release.ActiveCfg = Release|Win32 + {58C181B3-9516-463E-2F12-122155400054}.Release.Build.0 = Release|Win32 + {5E1D6C83-31DE-4F6F-6132-87A9FB663041}.Debug.ActiveCfg = Debug|Win32 + {5E1D6C83-31DE-4F6F-6132-87A9FB663041}.Debug.Build.0 = Debug|Win32 + {5E1D6C83-31DE-4F6F-6132-87A9FB663041}.Release.ActiveCfg = Release|Win32 + {5E1D6C83-31DE-4F6F-6132-87A9FB663041}.Release.Build.0 = Release|Win32 + {51D8E9C3-2D65-48FE-3AA7-7922C0E36329}.Debug.ActiveCfg = Debug|Win32 + {51D8E9C3-2D65-48FE-3AA7-7922C0E36329}.Debug.Build.0 = Debug|Win32 + {51D8E9C3-2D65-48FE-3AA7-7922C0E36329}.Release.ActiveCfg = Release|Win32 + {51D8E9C3-2D65-48FE-3AA7-7922C0E36329}.Release.Build.0 = Release|Win32 + {5E2838CC-0916-8F4E-A4F7-93506BA0D310}.Debug.ActiveCfg = Debug|Win32 + {5E2838CC-0916-8F4E-A4F7-93506BA0D310}.Debug.Build.0 = Debug|Win32 + {5E2838CC-0916-8F4E-A4F7-93506BA0D310}.Release.ActiveCfg = Release|Win32 + {5E2838CC-0916-8F4E-A4F7-93506BA0D310}.Release.Build.0 = Release|Win32 + {5371C383-6092-1238-A877-BAEB37867609}.Debug.ActiveCfg = Debug|Win32 + {5371C383-6092-1238-A877-BAEB37867609}.Debug.Build.0 = Debug|Win32 + {5371C383-6092-1238-A877-BAEB37867609}.Release.ActiveCfg = Release|Win32 + {5371C383-6092-1238-A877-BAEB37867609}.Release.Build.0 = Release|Win32 + {58CCE183-6092-48FE-A4F7-BA0D3A792608}.Debug.ActiveCfg = Debug|Win32 + {58CCE183-6092-48FE-A4F7-BA0D3A792608}.Debug.Build.0 = Debug|Win32 + {58CCE183-6092-48FE-A4F7-BA0D3A792608}.Release.ActiveCfg = Release|Win32 + {58CCE183-6092-48FE-A4F7-BA0D3A792608}.Release.Build.0 = Release|Win32 + {571C3383-6092-A877-1238-B3786BAE7605}.Debug.ActiveCfg = Debug|Win32 + {571C3383-6092-A877-1238-B3786BAE7605}.Debug.Build.0 = Debug|Win32 + {571C3383-6092-A877-1238-B3786BAE7605}.Release.ActiveCfg = Release|Win32 + {571C3383-6092-A877-1238-B3786BAE7605}.Release.Build.0 = Release|Win32 + {4E88C1C2-0961-F7A4-F48E-A6A7D3B06004}.Debug.ActiveCfg = Debug|Win32 + {4E88C1C2-0961-F7A4-F48E-A6A7D3B06004}.Debug.Build.0 = Debug|Win32 + {4E88C1C2-0961-F7A4-F48E-A6A7D3B06004}.Release.ActiveCfg = Release|Win32 + {4E88C1C2-0961-F7A4-F48E-A6A7D3B06004}.Release.Build.0 = Release|Win32 + {58CCE183-6092-48FE-A4F7-BA0D3A792603}.Debug.ActiveCfg = Debug|Win32 + {58CCE183-6092-48FE-A4F7-BA0D3A792603}.Debug.Build.0 = Debug|Win32 + {58CCE183-6092-48FE-A4F7-BA0D3A792603}.Release.ActiveCfg = Release|Win32 + {58CCE183-6092-48FE-A4F7-BA0D3A792603}.Release.Build.0 = Release|Win32 + {5CE11C83-096A-84FE-4FA2-D3A6BA792002}.Debug.ActiveCfg = Debug|Win32 + {5CE11C83-096A-84FE-4FA2-D3A6BA792002}.Debug.Build.0 = Debug|Win32 + {5CE11C83-096A-84FE-4FA2-D3A6BA792002}.Release.ActiveCfg = Release|Win32 + {5CE11C83-096A-84FE-4FA2-D3A6BA792002}.Release.Build.0 = Release|Win32 + {58BD1CC3-6972-F3F7-84BE-0DB736035922}.Debug.ActiveCfg = Debug|Win32 + {58BD1CC3-6972-F3F7-84BE-0DB736035922}.Debug.Build.0 = Debug|Win32 + {58BD1CC3-6972-F3F7-84BE-0DB736035922}.Release.ActiveCfg = Release|Win32 + {58BD1CC3-6972-F3F7-84BE-0DB736035922}.Release.Build.0 = Release|Win32 + {5BD1C7C3-3F7F-6972-84BE-B731D9236035}.Debug.ActiveCfg = Debug|Win32 + {5BD1C7C3-3F7F-6972-84BE-B731D9236035}.Debug.Build.0 = Debug|Win32 + {5BD1C7C3-3F7F-6972-84BE-B731D9236035}.Release.ActiveCfg = Release|Win32 + {5BD1C7C3-3F7F-6972-84BE-B731D9236035}.Release.Build.0 = Release|Win32 + {588CCD13-2962-83FE-F4B7-92230DB73629}.Debug.ActiveCfg = Debug|Win32 + {588CCD13-2962-83FE-F4B7-92230DB73629}.Debug.Build.0 = Debug|Win32 + {588CCD13-2962-83FE-F4B7-92230DB73629}.Release.ActiveCfg = Release|Win32 + {588CCD13-2962-83FE-F4B7-92230DB73629}.Release.Build.0 = Release|Win32 + {58CC2563-6092-48FE-FAF7-BA046A792658}.Debug.ActiveCfg = Debug|Win32 + {58CC2563-6092-48FE-FAF7-BA046A792658}.Debug.Build.0 = Debug|Win32 + {58CC2563-6092-48FE-FAF7-BA046A792658}.Release.ActiveCfg = Release|Win32 + {58CC2563-6092-48FE-FAF7-BA046A792658}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection diff --git a/test/vectorstream_test.cpp b/test/vectorstream_test.cpp index 8ec7bf8..efec5a5 100644 --- a/test/vectorstream_test.cpp +++ b/test/vectorstream_test.cpp @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -23,13 +24,32 @@ using namespace boost::interprocess; //Force instantiations to catch compile-time errors -typedef basic_vectorstream > my_stringstream_t; typedef basic_string my_string; +typedef basic_vectorstream my_stringstream_t; +typedef vector my_vector; +typedef basic_vectorstream my_vectorstream_t; template class basic_vectorstream; template class basic_vectorstream >; static int vectorstream_test() { + { //Test high watermarking initialization + my_stringstream_t my_stringstream; + int a (0); + my_stringstream << 11; + my_stringstream >> a; + if(a != 11) + return 1; + } + { //Test high watermarking initialization + my_vectorstream_t my_stringstream; + int a (0); + my_stringstream << 13; + my_stringstream >> a; + if(a != 13) + return 1; + } + //Pre-reserved string { my_stringstream_t my_stringstream; @@ -42,7 +62,7 @@ static int vectorstream_test() my_stringstream << "testline: " << i << std::endl; std_stringstream << "testline: " << i << std::endl; } - + if(std::strcmp(my_stringstream.vector().c_str(), std_stringstream.str().c_str()) != 0){ return 1; } @@ -114,15 +134,39 @@ static int vectorstream_test() } } } + + //Test seek + { + my_stringstream_t my_stringstream; + my_stringstream << "ABCDEFGHIJKLM"; + my_stringstream.seekp(0); + my_stringstream << "PQRST"; + string s("PQRSTFGHIJKLM"); + if(s != my_stringstream.vector()){ + return 1; + } + my_stringstream.seekp(0, std::ios_base::end); + my_stringstream << "NOPQRST"; + s ="PQRSTFGHIJKLMNOPQRST"; + if(s != my_stringstream.vector()){ + return 1; + } + int size = static_cast(my_stringstream.vector().size()); + my_stringstream.seekp(-size, std::ios_base::cur); + my_stringstream << "ABCDE"; + s ="ABCDEFGHIJKLMNOPQRST"; + if(s != my_stringstream.vector()){ + return 1; + } + } return 0; } int main () { - if(vectorstream_test()==-1){ + if(vectorstream_test()){ return 1; } - return 0; }