diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2014-10-31 14:41:14 +0000 |
---|---|---|
committer | <> | 2014-12-12 16:07:56 +0000 |
commit | ed232fdd34968697a68783b3195b1da4226915b5 (patch) | |
tree | 7a7053ceb8874b28ec4b868d4c49b500008a102e /libs/intrusive | |
parent | 1c3648bf5b7d17fcd4fe9bc95802b16fd9eee304 (diff) | |
download | boost-tarball-ed232fdd34968697a68783b3195b1da4226915b5.tar.gz |
Imported from /home/lorry/working-area/delta_boost-tarball/boost_1_57_0.tar.bz2.boost_1_57_0
Diffstat (limited to 'libs/intrusive')
69 files changed, 976 insertions, 472 deletions
diff --git a/libs/intrusive/doc/intrusive.qbk b/libs/intrusive/doc/intrusive.qbk index 6f72da363..dcf97d318 100644 --- a/libs/intrusive/doc/intrusive.qbk +++ b/libs/intrusive/doc/intrusive.qbk @@ -3761,6 +3761,17 @@ to be inserted in intrusive containers are allocated using `std::vector` or `std [section:release_notes Release Notes] +[section:release_notes_boost_1_57_00 Boost 1.57 Release] + +* Experimental version of node checkers, contributed by Matei David. Many thanks! +* Implemented [@http://www.open-std.org/JTC1/sc22/WG21/docs/papers/2013/n3644.pdf N3644: Null Forward Iterators] from C++14. +* Fixed bugs: + * [@https://github.com/boostorg/intrusive/pull/12 GitHub Pull #12: ['Fix MSVC14 warning C4456: declaration of 'x_parent_right' hides previous local declaration]] + * [@https://svn.boost.org/trac/boost/ticket/10520 Boost Trac #10520: ['Conversion warning in intrusive/detail/utilities.hpp]] + * [@https://svn.boost.org/trac/boost/ticket/10469 Boost Trac #10469: ['Erasing from intrusive unordered_multiset with optimize_multikey goes into an infinite loop]] + +[endsect] + [section:release_notes_boost_1_56_00 Boost 1.56 Release] * Improved Doxygen generated reference and updated and fixed forward-declaration header. diff --git a/libs/intrusive/example/doc_erasing_and_disposing.cpp b/libs/intrusive/example/doc_erasing_and_disposing.cpp index 7e0d27c76..7ac20e814 100644 --- a/libs/intrusive/example/doc_erasing_and_disposing.cpp +++ b/libs/intrusive/example/doc_erasing_and_disposing.cpp @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // -// (C) Copyright Ion Gaztanaga 2006-2013 +// (C) Copyright Ion Gaztanaga 2006-2014 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at @@ -9,7 +9,7 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include <boost/detail/no_exceptions_support.hpp> +#include <boost/core/no_exceptions_support.hpp> //[doc_erasing_and_disposing #include <boost/intrusive/list.hpp> diff --git a/libs/intrusive/example/doc_function_hooks.cpp b/libs/intrusive/example/doc_function_hooks.cpp index 9640fb36a..5c7781c9e 100644 --- a/libs/intrusive/example/doc_function_hooks.cpp +++ b/libs/intrusive/example/doc_function_hooks.cpp @@ -9,7 +9,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include <boost/intrusive/detail/config_begin.hpp> //[doc_function_hooks #include <boost/intrusive/list.hpp> #include <boost/intrusive/parent_from_member.hpp> @@ -72,5 +71,3 @@ int main() return 0; } //] - -#include <boost/intrusive/detail/config_end.hpp> diff --git a/libs/intrusive/example/doc_recursive_member.cpp b/libs/intrusive/example/doc_recursive_member.cpp index 37126e687..27aa08740 100644 --- a/libs/intrusive/example/doc_recursive_member.cpp +++ b/libs/intrusive/example/doc_recursive_member.cpp @@ -9,7 +9,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include <boost/intrusive/detail/config_begin.hpp> //[doc_recursive_member #include <boost/intrusive/list.hpp> #include <boost/intrusive/parent_from_member.hpp> @@ -82,5 +81,3 @@ int main() return 0; } //] - -#include <boost/intrusive/detail/config_end.hpp> diff --git a/libs/intrusive/meta/libraries.json b/libs/intrusive/meta/libraries.json new file mode 100644 index 000000000..58f37ba12 --- /dev/null +++ b/libs/intrusive/meta/libraries.json @@ -0,0 +1,14 @@ +{ + "key": "intrusive", + "name": "Intrusive", + "authors": [ + "Ion Gazta\u00f1aga" + ], + "description": "Intrusive containers and algorithms.", + "category": [ + "Containers" + ], + "maintainers": [ + "Ion Gaztanaga <igaztanaga -at- gmail.com>" + ] +} diff --git a/libs/intrusive/proj/vc7ide/Intrusive.sln b/libs/intrusive/proj/vc7ide/Intrusive.sln index aecfe69b0..03b1e1792 100644 --- a/libs/intrusive/proj/vc7ide/Intrusive.sln +++ b/libs/intrusive/proj/vc7ide/Intrusive.sln @@ -119,6 +119,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "container_size_test", "cont ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "parent_from_member", "parent_from_member\parent_from_member.vcproj", "{3A279B10-2A0B-B8C1-5894-9461524135B5}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "null_iterator", "null_iterator\null_iterator.vcproj", "{32A79B10-B2A0-C1B8-9458-9456152413B5}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject Global GlobalSection(SolutionConfiguration) = preSolution Debug = Debug @@ -247,6 +255,14 @@ Global {9E721E26-45AF-192C-AD67-A4CC7D096497}.Debug.Build.0 = Debug|Win32 {9E721E26-45AF-192C-AD67-A4CC7D096497}.Release.ActiveCfg = Release|Win32 {9E721E26-45AF-192C-AD67-A4CC7D096497}.Release.Build.0 = Release|Win32 + {3A279B10-2A0B-B8C1-5894-9461524135B5}.Debug.ActiveCfg = Debug|Win32 + {3A279B10-2A0B-B8C1-5894-9461524135B5}.Debug.Build.0 = Debug|Win32 + {3A279B10-2A0B-B8C1-5894-9461524135B5}.Release.ActiveCfg = Release|Win32 + {3A279B10-2A0B-B8C1-5894-9461524135B5}.Release.Build.0 = Release|Win32 + {32A79B10-B2A0-C1B8-9458-9456152413B5}.Debug.ActiveCfg = Debug|Win32 + {32A79B10-B2A0-C1B8-9458-9456152413B5}.Debug.Build.0 = Debug|Win32 + {32A79B10-B2A0-C1B8-9458-9456152413B5}.Release.ActiveCfg = Release|Win32 + {32A79B10-B2A0-C1B8-9458-9456152413B5}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection diff --git a/libs/intrusive/proj/vc7ide/Intrusive.vcproj b/libs/intrusive/proj/vc7ide/Intrusive.vcproj index fc776c005..f2b2d6c88 100644 --- a/libs/intrusive/proj/vc7ide/Intrusive.vcproj +++ b/libs/intrusive/proj/vc7ide/Intrusive.vcproj @@ -22,7 +22,7 @@ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" @@ -67,7 +67,7 @@ <Tool Name="VCCLCompilerTool" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="4" + RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" diff --git a/libs/intrusive/proj/vc7ide/_intrusivelib/_intrusivelib.vcproj b/libs/intrusive/proj/vc7ide/_intrusivelib/_intrusivelib.vcproj index b441854e8..d5bcd6f60 100644 --- a/libs/intrusive/proj/vc7ide/_intrusivelib/_intrusivelib.vcproj +++ b/libs/intrusive/proj/vc7ide/_intrusivelib/_intrusivelib.vcproj @@ -22,7 +22,7 @@ PreprocessorDefinitions="WIN32;_DEBUG;_LIB" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" @@ -60,7 +60,7 @@ <Tool Name="VCCLCompilerTool" PreprocessorDefinitions="WIN32;NDEBUG;_LIB" - RuntimeLibrary="4" + RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" @@ -167,6 +167,9 @@ RelativePath="..\..\..\..\..\boost\intrusive\pointer_plus_bits.hpp"> </File> <File + RelativePath="..\..\..\..\..\boost\intrusive\pointer_rebind.hpp"> + </File> + <File RelativePath="..\..\..\..\..\boost\intrusive\pointer_traits.hpp"> </File> <File @@ -227,9 +230,15 @@ Name="detail" Filter=""> <File + RelativePath="..\..\..\..\..\boost\intrusive\detail\algo_type.hpp"> + </File> + <File RelativePath="..\..\..\..\..\boost\intrusive\detail\any_node_and_algorithms.hpp"> </File> <File + RelativePath="..\..\..\..\..\boost\intrusive\detail\array_initializer.hpp"> + </File> + <File RelativePath="..\..\..\..\..\boost\intrusive\detail\assert.hpp"> </File> <File @@ -242,52 +251,112 @@ RelativePath="..\..\..\..\..\boost\intrusive\detail\config_end.hpp"> </File> <File + RelativePath="..\..\..\..\..\boost\intrusive\detail\default_header_holder.hpp"> + </File> + <File RelativePath="..\..\..\..\..\boost\intrusive\detail\ebo_functor_holder.hpp"> </File> <File + RelativePath="..\..\..\..\..\boost\intrusive\detail\empty_node_checker.hpp"> + </File> + <File + RelativePath="..\..\..\..\..\boost\intrusive\detail\equal_to_value.hpp"> + </File> + <File + RelativePath="..\..\..\..\..\boost\intrusive\detail\exception_disposer.hpp"> + </File> + <File RelativePath="..\..\..\..\..\boost\intrusive\detail\function_detector.hpp"> </File> <File RelativePath="..\..\..\..\..\boost\intrusive\detail\generic_hook.hpp"> </File> <File + RelativePath="..\..\..\..\..\boost\intrusive\detail\get_value_traits.hpp"> + </File> + <File RelativePath="..\..\..\..\..\boost\intrusive\detail\has_member_function_callable_with.hpp"> </File> <File RelativePath="..\..\..\..\..\boost\intrusive\detail\hashtable_node.hpp"> </File> <File + RelativePath="..\..\..\..\..\boost\intrusive\detail\hook_traits.hpp"> + </File> + <File + RelativePath="..\..\..\..\..\boost\intrusive\detail\iiterator.hpp"> + </File> + <File RelativePath="..\..\..\..\..\boost\intrusive\detail\is_stateful_value_traits.hpp"> </File> <File + RelativePath="..\..\..\..\..\boost\intrusive\detail\key_nodeptr_comp.hpp"> + </File> + <File + RelativePath="..\..\..\..\..\boost\intrusive\detail\list_iterator.hpp"> + </File> + <File RelativePath="..\..\..\..\..\boost\intrusive\detail\list_node.hpp"> </File> <File + RelativePath="..\..\..\..\..\boost\intrusive\detail\math.hpp"> + </File> + <File RelativePath="..\..\..\..\..\boost\intrusive\detail\memory_util.hpp"> </File> <File RelativePath="..\..\..\..\..\boost\intrusive\detail\mpl.hpp"> </File> <File + RelativePath="..\..\..\..\..\boost\intrusive\detail\node_cloner_disposer.hpp"> + </File> + <File + RelativePath="..\..\..\..\..\boost\intrusive\detail\node_holder.hpp"> + </File> + <File + RelativePath="..\..\..\..\..\boost\intrusive\detail\node_to_value.hpp"> + </File> + <File RelativePath="..\..\..\..\..\boost\intrusive\detail\parent_from_member.hpp"> </File> <File + RelativePath="..\..\..\..\..\boost\intrusive\detail\pointer_element.hpp"> + </File> + <File RelativePath="..\..\..\..\..\boost\intrusive\detail\preprocessor.hpp"> </File> <File RelativePath="..\..\..\..\..\boost\intrusive\detail\rbtree_node.hpp"> </File> <File + RelativePath="..\..\..\..\..\boost\intrusive\detail\simple_disposers.hpp"> + </File> + <File + RelativePath="..\..\..\..\..\boost\intrusive\detail\size_holder.hpp"> + </File> + <File + RelativePath="..\..\..\..\..\boost\intrusive\detail\slist_iterator.hpp"> + </File> + <File RelativePath="..\..\..\..\..\boost\intrusive\detail\slist_node.hpp"> </File> <File + RelativePath="..\..\..\..\..\boost\intrusive\detail\std_fwd.hpp"> + </File> + <File + RelativePath="..\..\..\..\..\boost\intrusive\detail\to_raw_pointer.hpp"> + </File> + <File RelativePath="..\..\..\..\..\boost\intrusive\detail\transform_iterator.hpp"> </File> <File + RelativePath="..\..\..\..\..\boost\intrusive\detail\tree_iterator.hpp"> + </File> + <File RelativePath="..\..\..\..\..\boost\intrusive\detail\tree_node.hpp"> </File> <File - RelativePath="..\..\..\..\..\boost\intrusive\detail\utilities.hpp"> + RelativePath="..\..\..\..\..\boost\intrusive\detail\uncast.hpp"> </File> <File RelativePath="..\..\..\..\..\boost\intrusive\detail\workaround.hpp"> diff --git a/libs/intrusive/proj/vc7ide/any_test/any_test.vcproj b/libs/intrusive/proj/vc7ide/any_test/any_test.vcproj index b05334908..ad0edcea9 100644 --- a/libs/intrusive/proj/vc7ide/any_test/any_test.vcproj +++ b/libs/intrusive/proj/vc7ide/any_test/any_test.vcproj @@ -26,7 +26,7 @@ KeepComments="FALSE" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" DisableLanguageExtensions="FALSE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" @@ -76,7 +76,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../../../../" PreprocessorDefinitions="BOOST_DATE_TIME_NO_LIB" - RuntimeLibrary="4" + RuntimeLibrary="0" DisableLanguageExtensions="FALSE" ForceConformanceInForLoopScope="TRUE" UsePrecompiledHeader="0" diff --git a/libs/intrusive/proj/vc7ide/avl_multiset/avl_multiset.vcproj b/libs/intrusive/proj/vc7ide/avl_multiset/avl_multiset.vcproj index 71997416b..c7056f23c 100644 --- a/libs/intrusive/proj/vc7ide/avl_multiset/avl_multiset.vcproj +++ b/libs/intrusive/proj/vc7ide/avl_multiset/avl_multiset.vcproj @@ -24,7 +24,7 @@ GeneratePreprocessedFile="0" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" DisableLanguageExtensions="FALSE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" @@ -73,7 +73,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../../../../" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="4" + RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" diff --git a/libs/intrusive/proj/vc7ide/avl_set/avl_set.vcproj b/libs/intrusive/proj/vc7ide/avl_set/avl_set.vcproj index afcca06c0..d3008ca94 100644 --- a/libs/intrusive/proj/vc7ide/avl_set/avl_set.vcproj +++ b/libs/intrusive/proj/vc7ide/avl_set/avl_set.vcproj @@ -23,7 +23,7 @@ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" DisableLanguageExtensions="FALSE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" @@ -72,7 +72,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../../../../" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="4" + RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" diff --git a/libs/intrusive/proj/vc7ide/container_size_test/container_size_test.vcproj b/libs/intrusive/proj/vc7ide/container_size_test/container_size_test.vcproj index dad1be0ec..40b80ff83 100644 --- a/libs/intrusive/proj/vc7ide/container_size_test/container_size_test.vcproj +++ b/libs/intrusive/proj/vc7ide/container_size_test/container_size_test.vcproj @@ -23,7 +23,7 @@ PreprocessorDefinitions="BOOST_DATE_TIME_NO_LIB" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" DisableLanguageExtensions="FALSE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" @@ -72,7 +72,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../../../../" PreprocessorDefinitions="BOOST_DATE_TIME_NO_LIB,NDEBUG" - RuntimeLibrary="4" + RuntimeLibrary="0" DisableLanguageExtensions="FALSE" UsePrecompiledHeader="0" WarningLevel="3" diff --git a/libs/intrusive/proj/vc7ide/custom_bucket_traits/custom_bucket_traits.vcproj b/libs/intrusive/proj/vc7ide/custom_bucket_traits/custom_bucket_traits.vcproj index a39617426..f7c4ca232 100644 --- a/libs/intrusive/proj/vc7ide/custom_bucket_traits/custom_bucket_traits.vcproj +++ b/libs/intrusive/proj/vc7ide/custom_bucket_traits/custom_bucket_traits.vcproj @@ -26,7 +26,7 @@ KeepComments="FALSE" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" DisableLanguageExtensions="FALSE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" @@ -76,7 +76,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../../../../" PreprocessorDefinitions="BOOST_DATE_TIME_NO_LIB" - RuntimeLibrary="4" + RuntimeLibrary="0" DisableLanguageExtensions="FALSE" ForceConformanceInForLoopScope="TRUE" UsePrecompiledHeader="0" diff --git a/libs/intrusive/proj/vc7ide/default_hook/default_hook.vcproj b/libs/intrusive/proj/vc7ide/default_hook/default_hook.vcproj index 9c26fb7f2..ceab5e039 100644 --- a/libs/intrusive/proj/vc7ide/default_hook/default_hook.vcproj +++ b/libs/intrusive/proj/vc7ide/default_hook/default_hook.vcproj @@ -26,7 +26,7 @@ KeepComments="FALSE" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" DisableLanguageExtensions="FALSE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" @@ -76,7 +76,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../../../../" PreprocessorDefinitions="BOOST_DATE_TIME_NO_LIB" - RuntimeLibrary="4" + RuntimeLibrary="0" DisableLanguageExtensions="FALSE" ForceConformanceInForLoopScope="TRUE" UsePrecompiledHeader="0" diff --git a/libs/intrusive/proj/vc7ide/function_hook/function_hook.vcproj b/libs/intrusive/proj/vc7ide/function_hook/function_hook.vcproj index 0fd863c05..b1f69c1a3 100644 --- a/libs/intrusive/proj/vc7ide/function_hook/function_hook.vcproj +++ b/libs/intrusive/proj/vc7ide/function_hook/function_hook.vcproj @@ -26,7 +26,7 @@ KeepComments="FALSE" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" DisableLanguageExtensions="FALSE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" @@ -76,7 +76,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../../../../" PreprocessorDefinitions="BOOST_DATE_TIME_NO_LIB" - RuntimeLibrary="4" + RuntimeLibrary="0" DisableLanguageExtensions="FALSE" ForceConformanceInForLoopScope="TRUE" UsePrecompiledHeader="0" diff --git a/libs/intrusive/proj/vc7ide/has_member_function_callable_with/has_member_function_callable_with.vcproj b/libs/intrusive/proj/vc7ide/has_member_function_callable_with/has_member_function_callable_with.vcproj index 51f0f27f8..9f33ef280 100644 --- a/libs/intrusive/proj/vc7ide/has_member_function_callable_with/has_member_function_callable_with.vcproj +++ b/libs/intrusive/proj/vc7ide/has_member_function_callable_with/has_member_function_callable_with.vcproj @@ -26,7 +26,7 @@ KeepComments="FALSE" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" DisableLanguageExtensions="FALSE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" @@ -76,7 +76,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../../../../" PreprocessorDefinitions="BOOST_DATE_TIME_NO_LIB" - RuntimeLibrary="4" + RuntimeLibrary="0" DisableLanguageExtensions="FALSE" ForceConformanceInForLoopScope="TRUE" UsePrecompiledHeader="0" diff --git a/libs/intrusive/proj/vc7ide/list/list.vcproj b/libs/intrusive/proj/vc7ide/list/list.vcproj index e5e510b01..a1e7097e9 100644 --- a/libs/intrusive/proj/vc7ide/list/list.vcproj +++ b/libs/intrusive/proj/vc7ide/list/list.vcproj @@ -26,7 +26,7 @@ KeepComments="FALSE" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" DisableLanguageExtensions="FALSE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" @@ -76,7 +76,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../../../../" PreprocessorDefinitions="BOOST_DATE_TIME_NO_LIB" - RuntimeLibrary="4" + RuntimeLibrary="0" DisableLanguageExtensions="FALSE" ForceConformanceInForLoopScope="TRUE" UsePrecompiledHeader="0" diff --git a/libs/intrusive/proj/vc7ide/make_functions/make_functions.vcproj b/libs/intrusive/proj/vc7ide/make_functions/make_functions.vcproj index cf926cec5..a3ccf327b 100644 --- a/libs/intrusive/proj/vc7ide/make_functions/make_functions.vcproj +++ b/libs/intrusive/proj/vc7ide/make_functions/make_functions.vcproj @@ -26,7 +26,7 @@ KeepComments="FALSE" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" DisableLanguageExtensions="FALSE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" @@ -76,7 +76,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../../../../" PreprocessorDefinitions="BOOST_DATE_TIME_NO_LIB" - RuntimeLibrary="4" + RuntimeLibrary="0" DisableLanguageExtensions="FALSE" ForceConformanceInForLoopScope="TRUE" UsePrecompiledHeader="0" diff --git a/libs/intrusive/proj/vc7ide/multiset/multiset.vcproj b/libs/intrusive/proj/vc7ide/multiset/multiset.vcproj index 423d48e0e..c7bd42cab 100644 --- a/libs/intrusive/proj/vc7ide/multiset/multiset.vcproj +++ b/libs/intrusive/proj/vc7ide/multiset/multiset.vcproj @@ -23,7 +23,7 @@ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_DATE_TIME_NO_LIB" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" DisableLanguageExtensions="FALSE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" @@ -72,7 +72,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../../../../" PreprocessorDefinitions="_WIN32;NDEBUG;_CONSOLE;BOOST_DATE_TIME_NO_LIB" - RuntimeLibrary="4" + RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" diff --git a/libs/intrusive/proj/vc7ide/null_iterator/null_iterator.vcproj b/libs/intrusive/proj/vc7ide/null_iterator/null_iterator.vcproj new file mode 100644 index 000000000..255121f83 --- /dev/null +++ b/libs/intrusive/proj/vc7ide/null_iterator/null_iterator.vcproj @@ -0,0 +1,128 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="null_iterator" + ProjectGUID="{32A79B10-B2A0-C1B8-9458-9456152413B5}" + RootNamespace="virtual_base" + Keyword="Win32Proj"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="1" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="../../../../../" + PreprocessorDefinitions="BOOST_DATE_TIME_NO_LIB" + GeneratePreprocessedFile="0" + KeepComments="FALSE" + MinimalRebuild="TRUE" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + DisableLanguageExtensions="FALSE" + TreatWChar_tAsBuiltInType="TRUE" + ForceConformanceInForLoopScope="TRUE" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="TRUE" + DebugInformationFormat="4"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + OutputFile="$(OutDir)/null_iterator.exe" + LinkIncremental="2" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile="$(OutDir)/null_iterator.pdb" + GenerateMapFile="TRUE" + SubSystem="1" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="1" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="../../../../../" + PreprocessorDefinitions="BOOST_DATE_TIME_NO_LIB" + RuntimeLibrary="0" + DisableLanguageExtensions="FALSE" + ForceConformanceInForLoopScope="TRUE" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="TRUE" + DebugInformationFormat="3"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + OutputFile="$(OutDir)/null_iterator.exe" + LinkIncremental="1" + GenerateDebugInformation="TRUE" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <File + RelativePath="..\..\..\test\null_iterator_test.cpp"> + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/libs/intrusive/proj/vc7ide/pack_options/pack_options.vcproj b/libs/intrusive/proj/vc7ide/pack_options/pack_options.vcproj index 6da13c652..e9b2e165e 100644 --- a/libs/intrusive/proj/vc7ide/pack_options/pack_options.vcproj +++ b/libs/intrusive/proj/vc7ide/pack_options/pack_options.vcproj @@ -26,7 +26,7 @@ KeepComments="FALSE" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" DisableLanguageExtensions="FALSE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" @@ -76,7 +76,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../../../../" PreprocessorDefinitions="BOOST_DATE_TIME_NO_LIB" - RuntimeLibrary="4" + RuntimeLibrary="0" DisableLanguageExtensions="FALSE" ForceConformanceInForLoopScope="TRUE" UsePrecompiledHeader="0" diff --git a/libs/intrusive/proj/vc7ide/parent_from_member/parent_from_member.vcproj b/libs/intrusive/proj/vc7ide/parent_from_member/parent_from_member.vcproj new file mode 100644 index 000000000..47da36ae0 --- /dev/null +++ b/libs/intrusive/proj/vc7ide/parent_from_member/parent_from_member.vcproj @@ -0,0 +1,133 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="parent_from_member" + ProjectGUID="{3A279B10-2A0B-B8C1-5894-9461524135B5}" + RootNamespace="virtual_base" + Keyword="Win32Proj"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="1" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="../../../../../" + PreprocessorDefinitions="BOOST_DATE_TIME_NO_LIB" + GeneratePreprocessedFile="0" + KeepComments="FALSE" + MinimalRebuild="TRUE" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + DisableLanguageExtensions="FALSE" + TreatWChar_tAsBuiltInType="TRUE" + ForceConformanceInForLoopScope="TRUE" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="TRUE" + DebugInformationFormat="4"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + OutputFile="$(OutDir)/parent_from_member.exe" + LinkIncremental="2" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile="$(OutDir)/parent_from_member.pdb" + GenerateMapFile="TRUE" + SubSystem="1" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="1" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="../../../../../" + PreprocessorDefinitions="BOOST_DATE_TIME_NO_LIB" + RuntimeLibrary="0" + DisableLanguageExtensions="FALSE" + ForceConformanceInForLoopScope="TRUE" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="TRUE" + DebugInformationFormat="3"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + OutputFile="$(OutDir)/parent_from_member.exe" + LinkIncremental="1" + GenerateDebugInformation="TRUE" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{73AC7B31-34A7-B37A-4266-D184DA7C723C}"> + <File + RelativePath="..\..\..\test\parent_from_member_test.cpp"> + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/libs/intrusive/proj/vc7ide/perf_test/perf_test.vcproj b/libs/intrusive/proj/vc7ide/perf_test/perf_test.vcproj index 5e410b1d6..330e1854e 100644 --- a/libs/intrusive/proj/vc7ide/perf_test/perf_test.vcproj +++ b/libs/intrusive/proj/vc7ide/perf_test/perf_test.vcproj @@ -23,7 +23,7 @@ PreprocessorDefinitions="BOOST_DATE_TIME_NO_LIB" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" DisableLanguageExtensions="FALSE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" @@ -72,7 +72,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../../../../" PreprocessorDefinitions="BOOST_DATE_TIME_NO_LIB" - RuntimeLibrary="4" + RuntimeLibrary="0" DisableLanguageExtensions="FALSE" UsePrecompiledHeader="0" WarningLevel="3" diff --git a/libs/intrusive/proj/vc7ide/pointer_traits/pointer_traits.vcproj b/libs/intrusive/proj/vc7ide/pointer_traits/pointer_traits.vcproj index 7f77c2973..1ad31b788 100644 --- a/libs/intrusive/proj/vc7ide/pointer_traits/pointer_traits.vcproj +++ b/libs/intrusive/proj/vc7ide/pointer_traits/pointer_traits.vcproj @@ -26,7 +26,7 @@ KeepComments="FALSE" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" DisableLanguageExtensions="FALSE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" @@ -76,7 +76,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../../../../" PreprocessorDefinitions="BOOST_DATE_TIME_NO_LIB" - RuntimeLibrary="4" + RuntimeLibrary="0" DisableLanguageExtensions="FALSE" ForceConformanceInForLoopScope="TRUE" UsePrecompiledHeader="0" diff --git a/libs/intrusive/proj/vc7ide/recursive/recursive.vcproj b/libs/intrusive/proj/vc7ide/recursive/recursive.vcproj index 1e4b6db37..facd90dd0 100644 --- a/libs/intrusive/proj/vc7ide/recursive/recursive.vcproj +++ b/libs/intrusive/proj/vc7ide/recursive/recursive.vcproj @@ -26,7 +26,7 @@ KeepComments="FALSE" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" DisableLanguageExtensions="FALSE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" @@ -76,7 +76,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../../../../" PreprocessorDefinitions="BOOST_DATE_TIME_NO_LIB" - RuntimeLibrary="4" + RuntimeLibrary="0" DisableLanguageExtensions="FALSE" ForceConformanceInForLoopScope="TRUE" UsePrecompiledHeader="0" diff --git a/libs/intrusive/proj/vc7ide/scary_iterators/scary_iterators.vcproj b/libs/intrusive/proj/vc7ide/scary_iterators/scary_iterators.vcproj index 572413014..969e9efb6 100644 --- a/libs/intrusive/proj/vc7ide/scary_iterators/scary_iterators.vcproj +++ b/libs/intrusive/proj/vc7ide/scary_iterators/scary_iterators.vcproj @@ -26,7 +26,7 @@ KeepComments="FALSE" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" DisableLanguageExtensions="FALSE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" @@ -76,7 +76,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../../../../" PreprocessorDefinitions="BOOST_DATE_TIME_NO_LIB" - RuntimeLibrary="4" + RuntimeLibrary="0" DisableLanguageExtensions="FALSE" ForceConformanceInForLoopScope="TRUE" UsePrecompiledHeader="0" diff --git a/libs/intrusive/proj/vc7ide/set/set.vcproj b/libs/intrusive/proj/vc7ide/set/set.vcproj index 2fb23692e..83c9788e7 100644 --- a/libs/intrusive/proj/vc7ide/set/set.vcproj +++ b/libs/intrusive/proj/vc7ide/set/set.vcproj @@ -24,7 +24,7 @@ GeneratePreprocessedFile="0" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" DisableLanguageExtensions="FALSE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" @@ -73,7 +73,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../../../../" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="4" + RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" diff --git a/libs/intrusive/proj/vc7ide/sg_multiset/sg_multiset.vcproj b/libs/intrusive/proj/vc7ide/sg_multiset/sg_multiset.vcproj index d954cdb0d..cbde49b2c 100644 --- a/libs/intrusive/proj/vc7ide/sg_multiset/sg_multiset.vcproj +++ b/libs/intrusive/proj/vc7ide/sg_multiset/sg_multiset.vcproj @@ -24,7 +24,7 @@ GeneratePreprocessedFile="0" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" DisableLanguageExtensions="FALSE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" @@ -73,7 +73,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../../../../" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="4" + RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" diff --git a/libs/intrusive/proj/vc7ide/sg_set/sg_set.vcproj b/libs/intrusive/proj/vc7ide/sg_set/sg_set.vcproj index a339dcb49..c1845889d 100644 --- a/libs/intrusive/proj/vc7ide/sg_set/sg_set.vcproj +++ b/libs/intrusive/proj/vc7ide/sg_set/sg_set.vcproj @@ -23,7 +23,7 @@ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" DisableLanguageExtensions="FALSE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" @@ -72,7 +72,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../../../../" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="4" + RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" diff --git a/libs/intrusive/proj/vc7ide/slist/slist.vcproj b/libs/intrusive/proj/vc7ide/slist/slist.vcproj index 14d5ca733..cca877412 100644 --- a/libs/intrusive/proj/vc7ide/slist/slist.vcproj +++ b/libs/intrusive/proj/vc7ide/slist/slist.vcproj @@ -23,7 +23,7 @@ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" DisableLanguageExtensions="FALSE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" @@ -72,7 +72,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../../../../" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="4" + RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" diff --git a/libs/intrusive/proj/vc7ide/splay_multiset/splay_multiset.vcproj b/libs/intrusive/proj/vc7ide/splay_multiset/splay_multiset.vcproj index 869b642ea..6b100a554 100644 --- a/libs/intrusive/proj/vc7ide/splay_multiset/splay_multiset.vcproj +++ b/libs/intrusive/proj/vc7ide/splay_multiset/splay_multiset.vcproj @@ -24,7 +24,7 @@ GeneratePreprocessedFile="0" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" DisableLanguageExtensions="FALSE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" @@ -73,7 +73,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../../../../" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="4" + RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" diff --git a/libs/intrusive/proj/vc7ide/splay_set/splay_set.vcproj b/libs/intrusive/proj/vc7ide/splay_set/splay_set.vcproj index 1f2336a1e..03df47e18 100644 --- a/libs/intrusive/proj/vc7ide/splay_set/splay_set.vcproj +++ b/libs/intrusive/proj/vc7ide/splay_set/splay_set.vcproj @@ -23,7 +23,7 @@ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" DisableLanguageExtensions="FALSE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" @@ -72,7 +72,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../../../../" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="4" + RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" diff --git a/libs/intrusive/proj/vc7ide/stateful_value_traits/stateful_value_traits.vcproj b/libs/intrusive/proj/vc7ide/stateful_value_traits/stateful_value_traits.vcproj index 72cbe3b2c..afb6679ad 100644 --- a/libs/intrusive/proj/vc7ide/stateful_value_traits/stateful_value_traits.vcproj +++ b/libs/intrusive/proj/vc7ide/stateful_value_traits/stateful_value_traits.vcproj @@ -26,7 +26,7 @@ KeepComments="FALSE" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" DisableLanguageExtensions="FALSE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" @@ -76,7 +76,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../../../../" PreprocessorDefinitions="BOOST_DATE_TIME_NO_LIB" - RuntimeLibrary="4" + RuntimeLibrary="0" DisableLanguageExtensions="FALSE" ForceConformanceInForLoopScope="TRUE" UsePrecompiledHeader="0" diff --git a/libs/intrusive/proj/vc7ide/treap_multiset/treap_multiset.vcproj b/libs/intrusive/proj/vc7ide/treap_multiset/treap_multiset.vcproj index af29eb22f..2ced5eec4 100644 --- a/libs/intrusive/proj/vc7ide/treap_multiset/treap_multiset.vcproj +++ b/libs/intrusive/proj/vc7ide/treap_multiset/treap_multiset.vcproj @@ -23,7 +23,7 @@ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" DisableLanguageExtensions="FALSE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" @@ -72,7 +72,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../../../../" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="4" + RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" diff --git a/libs/intrusive/proj/vc7ide/treap_set/treap_set.vcproj b/libs/intrusive/proj/vc7ide/treap_set/treap_set.vcproj index 5d438fe83..3f90560ef 100644 --- a/libs/intrusive/proj/vc7ide/treap_set/treap_set.vcproj +++ b/libs/intrusive/proj/vc7ide/treap_set/treap_set.vcproj @@ -23,7 +23,7 @@ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" DisableLanguageExtensions="FALSE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" @@ -72,7 +72,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../../../../" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="4" + RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" diff --git a/libs/intrusive/proj/vc7ide/tree_perf_test/tree_perf_test.vcproj b/libs/intrusive/proj/vc7ide/tree_perf_test/tree_perf_test.vcproj index b0b6a3e10..6184139e5 100644 --- a/libs/intrusive/proj/vc7ide/tree_perf_test/tree_perf_test.vcproj +++ b/libs/intrusive/proj/vc7ide/tree_perf_test/tree_perf_test.vcproj @@ -23,7 +23,7 @@ PreprocessorDefinitions="BOOST_DATE_TIME_NO_LIB" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" DisableLanguageExtensions="FALSE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" @@ -72,7 +72,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../../../../" PreprocessorDefinitions="BOOST_DATE_TIME_NO_LIB,NDEBUG" - RuntimeLibrary="4" + RuntimeLibrary="0" DisableLanguageExtensions="FALSE" UsePrecompiledHeader="0" WarningLevel="3" diff --git a/libs/intrusive/proj/vc7ide/unordered_multiset/unordered_multiset.vcproj b/libs/intrusive/proj/vc7ide/unordered_multiset/unordered_multiset.vcproj index 2a8ec4ab0..3da0b3ee0 100644 --- a/libs/intrusive/proj/vc7ide/unordered_multiset/unordered_multiset.vcproj +++ b/libs/intrusive/proj/vc7ide/unordered_multiset/unordered_multiset.vcproj @@ -24,7 +24,7 @@ GeneratePreprocessedFile="0" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" DisableLanguageExtensions="FALSE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" @@ -73,7 +73,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../../../../" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="4" + RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" diff --git a/libs/intrusive/proj/vc7ide/unordered_set/unordered_set.vcproj b/libs/intrusive/proj/vc7ide/unordered_set/unordered_set.vcproj index a3bb58474..2fb7a217a 100644 --- a/libs/intrusive/proj/vc7ide/unordered_set/unordered_set.vcproj +++ b/libs/intrusive/proj/vc7ide/unordered_set/unordered_set.vcproj @@ -24,7 +24,7 @@ GeneratePreprocessedFile="0" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" DisableLanguageExtensions="FALSE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" @@ -73,7 +73,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../../../../" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="4" + RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" diff --git a/libs/intrusive/proj/vc7ide/virtual_base/virtual_base.vcproj b/libs/intrusive/proj/vc7ide/virtual_base/virtual_base.vcproj index b5f6f66ba..69399e21d 100644 --- a/libs/intrusive/proj/vc7ide/virtual_base/virtual_base.vcproj +++ b/libs/intrusive/proj/vc7ide/virtual_base/virtual_base.vcproj @@ -26,7 +26,7 @@ KeepComments="FALSE" MinimalRebuild="TRUE" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" DisableLanguageExtensions="FALSE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" @@ -76,7 +76,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../../../../" PreprocessorDefinitions="BOOST_DATE_TIME_NO_LIB" - RuntimeLibrary="4" + RuntimeLibrary="0" DisableLanguageExtensions="FALSE" ForceConformanceInForLoopScope="TRUE" UsePrecompiledHeader="0" diff --git a/libs/intrusive/test/any_test.cpp b/libs/intrusive/test/any_test.cpp index b130cf62a..efc7d984a 100644 --- a/libs/intrusive/test/any_test.cpp +++ b/libs/intrusive/test/any_test.cpp @@ -11,7 +11,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include<boost/intrusive/detail/config_begin.hpp> #include<boost/intrusive/any_hook.hpp> #include<boost/intrusive/slist.hpp> #include<boost/intrusive/rbtree.hpp> @@ -188,5 +187,3 @@ int main() instantiation_test(); return 0; } - -#include <boost/intrusive/detail/config_end.hpp> diff --git a/libs/intrusive/test/avl_multiset_test.cpp b/libs/intrusive/test/avl_multiset_test.cpp index 056889a67..7bb3085a8 100644 --- a/libs/intrusive/test/avl_multiset_test.cpp +++ b/libs/intrusive/test/avl_multiset_test.cpp @@ -10,7 +10,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include <boost/intrusive/detail/config_begin.hpp> #include <boost/intrusive/avl_set.hpp> #include <boost/intrusive/pointer_traits.hpp> #include "itestvalue.hpp" @@ -123,8 +122,7 @@ class test_main_template , GetContainer_With_Holder< Default_Holder >::template GetContainer >::test_all(); test::test_generic_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -159,8 +157,7 @@ class test_main_template<VoidPointer, false, Default_Holder> >::test_all(); test::test_generic_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -176,8 +173,7 @@ class test_main_template<VoidPointer, false, Default_Holder> >::test_all(); test::test_generic_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::auto_member_hook_type , &value_type::auto_node_ > @@ -249,5 +245,3 @@ int main() return boost::report_errors(); } - -#include <boost/intrusive/detail/config_end.hpp> diff --git a/libs/intrusive/test/avl_set_test.cpp b/libs/intrusive/test/avl_set_test.cpp index 5e7403cb9..7654ab71e 100644 --- a/libs/intrusive/test/avl_set_test.cpp +++ b/libs/intrusive/test/avl_set_test.cpp @@ -10,7 +10,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include <boost/intrusive/detail/config_begin.hpp> #include <boost/intrusive/avl_set.hpp> #include "itestvalue.hpp" #include "bptr_value.hpp" @@ -123,8 +122,7 @@ class test_main_template , GetContainer_With_Holder< Default_Holder >::template GetContainer >::test_all(); test::test_generic_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -159,8 +157,7 @@ class test_main_template<VoidPointer, false, Default_Holder> >::test_all(); test::test_generic_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -176,8 +173,7 @@ class test_main_template<VoidPointer, false, Default_Holder> >::test_all(); test::test_generic_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::auto_member_hook_type , &value_type::auto_node_ > @@ -250,5 +246,3 @@ int main() return boost::report_errors(); } - -#include <boost/intrusive/detail/config_end.hpp> diff --git a/libs/intrusive/test/bounded_pointer.hpp b/libs/intrusive/test/bounded_pointer.hpp index b584def8e..485930082 100644 --- a/libs/intrusive/test/bounded_pointer.hpp +++ b/libs/intrusive/test/bounded_pointer.hpp @@ -19,6 +19,7 @@ #include <boost/container/vector.hpp> #include <boost/intrusive/detail/mpl.hpp> #include <boost/intrusive/pointer_traits.hpp> +#include <boost/core/no_exceptions_support.hpp> template < typename T > class bounded_pointer; @@ -38,7 +39,7 @@ class bounded_pointer typedef void (bounded_pointer::*unspecified_bool_type)() const; public: - typedef typename boost::remove_const< T >::type mut_val_t; + typedef typename boost::intrusive::detail::remove_const< T >::type mut_val_t; typedef const mut_val_t const_val_t; typedef bounded_reference<T> reference; @@ -140,7 +141,7 @@ template < typename T > class bounded_reference { public: - typedef typename boost::remove_const< T >::type mut_val_t; + typedef typename boost::intrusive::detail::remove_const< T >::type mut_val_t; typedef const mut_val_t const_val_t; typedef bounded_pointer< T > pointer; static const unsigned char max_offset = pointer::max_offset; @@ -211,7 +212,7 @@ class bounded_allocator pointer allocate(size_t n) { assert(inited()); - assert(n == 1); + assert(n == 1);(void)n; pointer p; unsigned char i; for (i = 0; i < max_offset && m_in_use[i]; ++i); @@ -224,7 +225,7 @@ class bounded_allocator void deallocate(pointer p, size_t n) { assert(inited()); - assert(n == 1); + assert(n == 1);(void)n; assert(m_in_use[p.m_offset]); m_in_use[p.m_offset] = false; } diff --git a/libs/intrusive/test/bptr_value.hpp b/libs/intrusive/test/bptr_value.hpp index 17c3638d3..2a1a12a56 100644 --- a/libs/intrusive/test/bptr_value.hpp +++ b/libs/intrusive/test/bptr_value.hpp @@ -15,7 +15,6 @@ #define BOOST_INTRUSIVE_BPTR_VALUE_HPP #include <cassert> -#include <boost/intrusive/list.hpp> #include "bounded_pointer.hpp" #include "common_functors.hpp" @@ -39,7 +38,6 @@ struct BPtr_Value { if (is_linked()) { - std::cerr << "BPtr_Value dtor: destructing linked value: &=" << (void*)this << "\n"; assert(false); } } @@ -50,7 +48,6 @@ struct BPtr_Value { if (is_linked()) { - std::cerr << "BPtr_Value asop: assigning to linked value: &=" << (void*)this << ", src=" << (void*)&src << "\n"; assert(false); } value_ = src.value_; @@ -99,11 +96,6 @@ struct BPtr_Value friend bool operator!= (const BPtr_Value &other1, int other2) { return !(other1.value_ == other2); } - friend std::ostream& operator << (std::ostream& os, const BPtr_Value& v) - { - os << v.value_; - return os; - } }; // class BPtr_Value template < typename Node_Algorithms > diff --git a/libs/intrusive/test/common_functors.hpp b/libs/intrusive/test/common_functors.hpp index a6af9fba0..7433d3801 100644 --- a/libs/intrusive/test/common_functors.hpp +++ b/libs/intrusive/test/common_functors.hpp @@ -13,7 +13,7 @@ #ifndef BOOST_INTRUSIVE_TEST_COMMON_FUNCTORS_HPP #define BOOST_INTRUSIVE_TEST_COMMON_FUNCTORS_HPP -#include<boost/intrusive/detail/utilities.hpp> +#include<boost/intrusive/detail/iiterator.hpp> #include<boost/intrusive/detail/mpl.hpp> #include<boost/static_assert.hpp> @@ -28,7 +28,7 @@ class delete_disposer template <class Pointer> void operator()(Pointer p) { - typedef typename std::iterator_traits<Pointer>::value_type value_type; + typedef typename boost::intrusive::iterator_traits<Pointer>::value_type value_type; BOOST_STATIC_ASSERT(( detail::is_same<T, value_type>::value )); delete boost::intrusive::detail::to_raw_pointer(p); } @@ -50,6 +50,14 @@ class new_default_factory { return new T(); } }; +class empty_disposer +{ + public: + template<class T> + void operator()(const T &) + {} +}; + } //namespace test { } //namespace intrusive { } //namespace boost { diff --git a/libs/intrusive/test/container_size_test.cpp b/libs/intrusive/test/container_size_test.cpp index 00ad27f10..ba385e6f8 100644 --- a/libs/intrusive/test/container_size_test.cpp +++ b/libs/intrusive/test/container_size_test.cpp @@ -9,7 +9,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include <boost/intrusive/detail/config_begin.hpp> #include <boost/detail/lightweight_test.hpp> #include <cstddef> @@ -27,6 +26,9 @@ using namespace boost::intrusive; +BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(reverse_iterator) +BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(const_reverse_iterator) + template<bool Value> struct boolean { @@ -51,161 +53,159 @@ void test_sizes(boolean<false>, std::size_t) {} template<class C> -void test_iterator_sizes(C &, std::size_t size) +void test_iterator_sizes(std::size_t size) { - typedef typename C::iterator iterator; - typedef typename C::const_iterator const_iterator; + typedef typename C::iterator iterator; + typedef typename C::const_iterator const_iterator; + typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT + (::, C, reverse_iterator, iterator) reverse_iterator; + typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT + (::, C, const_reverse_iterator, const_iterator) const_reverse_iterator; + BOOST_TEST_EQ(sizeof(iterator), size); BOOST_TEST_EQ(sizeof(const_iterator), size); + BOOST_TEST_EQ(sizeof(iterator), sizeof(reverse_iterator)); + BOOST_TEST_EQ(sizeof(const_iterator), size); + BOOST_TEST_EQ(sizeof(const_iterator), sizeof(const_reverse_iterator)); } //Test sizes for common 32 and 64 bit architectures void test_sizes(boolean<true>, std::size_t wordsize) { { //list - list<node< node<list_base_hook<> > > > c; + typedef list<node<list_base_hook<> > > c; BOOST_TEST_EQ(sizeof(c), wordsize*3); - test_iterator_sizes(c, wordsize); + test_iterator_sizes<c>(wordsize); } { - list<node< node<list_base_hook<> > >, constant_time_size<false> > c; + typedef list<node<list_base_hook<> >, constant_time_size<false> > c; BOOST_TEST_EQ(sizeof(c), wordsize*2); - test_iterator_sizes(c, wordsize); + test_iterator_sizes<c>(wordsize); } { - list< node< list_base_hook<> >, header_holder_type< pointer_holder< list_node<void*> > > > c; + typedef list< node< list_base_hook<> >, header_holder_type< pointer_holder< list_node<void*> > > > c; BOOST_TEST_EQ(sizeof(c), wordsize*2); - test_iterator_sizes(c, wordsize); + test_iterator_sizes<c>(wordsize); } { - list< node< list_base_hook<> >, constant_time_size<false>, header_holder_type< pointer_holder< list_node<void*> > > > c; + typedef list< node< list_base_hook<> >, constant_time_size<false>, header_holder_type< pointer_holder< list_node<void*> > > > c; BOOST_TEST_EQ(sizeof(c), wordsize*1); - test_iterator_sizes(c, wordsize); + test_iterator_sizes<c>(wordsize); } { //slist - slist<node< node< slist_base_hook<> > > > c; + typedef slist<node< slist_base_hook<> > > c; BOOST_TEST_EQ(sizeof(c), wordsize*2); - test_iterator_sizes(c, wordsize); + test_iterator_sizes<c>(wordsize); } { - slist<node< node< slist_base_hook<> > > , constant_time_size<false> > c; + typedef slist<node< slist_base_hook<> >, constant_time_size<false> > c; BOOST_TEST_EQ(sizeof(c), wordsize*1); - test_iterator_sizes(c, wordsize); + test_iterator_sizes<c>(wordsize); } { - slist<node< node< slist_base_hook<> > > , cache_last<true> > c; + typedef slist<node< slist_base_hook<> >, cache_last<true> > c; BOOST_TEST_EQ(sizeof(c), wordsize*3); - test_iterator_sizes(c, wordsize); + test_iterator_sizes<c>(wordsize); } { //set - set<node< node< set_base_hook<> > > > c; + typedef set<node< set_base_hook<> > > c; BOOST_TEST_EQ(sizeof(c), wordsize*5); - test_iterator_sizes(c, wordsize); + test_iterator_sizes<c>(wordsize); } { - set<node< node< set_base_hook<> > > , constant_time_size<false> > c; + typedef set<node< set_base_hook<> > , constant_time_size<false> > c; BOOST_TEST_EQ(sizeof(c), wordsize*4); - test_iterator_sizes(c, wordsize); + test_iterator_sizes<c>(wordsize); } { - set<node< node< set_base_hook<optimize_size<true> > > > , constant_time_size<false> > c; + typedef set<node< set_base_hook<optimize_size<true> > > , constant_time_size<false> > c; BOOST_TEST_EQ(sizeof(c), wordsize*3); - test_iterator_sizes(c, wordsize); + test_iterator_sizes<c>(wordsize); } { - set< node< set_base_hook<> >, header_holder_type< pointer_holder< rbtree_node<void*> > > > c; + typedef set< node< set_base_hook<> >, header_holder_type< pointer_holder< rbtree_node<void*> > > > c; BOOST_TEST_EQ(sizeof(c), wordsize*2); - test_iterator_sizes(c, wordsize); + test_iterator_sizes<c>(wordsize); } { - set< node< set_base_hook<> >, constant_time_size<false>, header_holder_type< pointer_holder< rbtree_node<void*> > > > c; + typedef set< node< set_base_hook<> >, constant_time_size<false>, header_holder_type< pointer_holder< rbtree_node<void*> > > > c; BOOST_TEST_EQ(sizeof(c), wordsize*1); - test_iterator_sizes(c, wordsize); + test_iterator_sizes<c>(wordsize); } { //avl - avl_set<node< node< avl_set_base_hook<> > > > c; + typedef avl_set<node< avl_set_base_hook<> > > c; BOOST_TEST_EQ(sizeof(c), wordsize*5); - test_iterator_sizes(c, wordsize); + test_iterator_sizes<c>(wordsize); } { - avl_set<node< node< avl_set_base_hook<> > > , constant_time_size<false> > c; + typedef avl_set<node< avl_set_base_hook<> > , constant_time_size<false> > c; BOOST_TEST_EQ(sizeof(c), wordsize*4); - test_iterator_sizes(c, wordsize); + test_iterator_sizes<c>(wordsize); } { - avl_set<node< node< avl_set_base_hook<optimize_size<true> > > > , constant_time_size<false> > c; + typedef avl_set<node< avl_set_base_hook<optimize_size<true> > > , constant_time_size<false> > c; BOOST_TEST_EQ(sizeof(c), wordsize*3); - test_iterator_sizes(c, wordsize); + test_iterator_sizes<c>(wordsize); } { - avl_set< node< avl_set_base_hook<> >, header_holder_type< pointer_holder< avltree_node<void*> > > > c; + typedef avl_set< node< avl_set_base_hook<> >, header_holder_type< pointer_holder< avltree_node<void*> > > > c; BOOST_TEST_EQ(sizeof(c), wordsize*2); - test_iterator_sizes(c, wordsize); + test_iterator_sizes<c>(wordsize); } { - avl_set< node< avl_set_base_hook<> >, constant_time_size<false>, header_holder_type< pointer_holder< avltree_node<void*> > > > c; + typedef avl_set< node< avl_set_base_hook<> >, constant_time_size<false>, header_holder_type< pointer_holder< avltree_node<void*> > > > c; BOOST_TEST_EQ(sizeof(c), wordsize*1); - test_iterator_sizes(c, wordsize); + test_iterator_sizes<c>(wordsize); } { //splay - splay_set<node< node< bs_set_base_hook<> > > > c; + typedef splay_set<node< bs_set_base_hook<> > > c; BOOST_TEST_EQ(sizeof(c), wordsize*4); - test_iterator_sizes(c, wordsize); + test_iterator_sizes<c>(wordsize); } { - splay_set<node< node< bs_set_base_hook<> > > , constant_time_size<false> > c; + typedef splay_set<node< bs_set_base_hook<> > , constant_time_size<false> > c; BOOST_TEST_EQ(sizeof(c), wordsize*3); - test_iterator_sizes(c, wordsize); + test_iterator_sizes<c>(wordsize); } { //scapegoat - sg_set<node< bs_set_base_hook<> > > c; + typedef sg_set<node< bs_set_base_hook<> > > c; BOOST_TEST_EQ(sizeof(c), (wordsize*5+sizeof(float)*2)); - test_iterator_sizes(c, wordsize); + test_iterator_sizes<c>(wordsize); } { //treap - treap_set<node< bs_set_base_hook<> > > c; + typedef treap_set<node< bs_set_base_hook<> > > c; BOOST_TEST_EQ(sizeof(c), wordsize*4); - test_iterator_sizes(c, wordsize); + test_iterator_sizes<c>(wordsize); } { - treap_set<node< bs_set_base_hook<> > , constant_time_size<false> > c; + typedef treap_set<node< bs_set_base_hook<> > , constant_time_size<false> > c; BOOST_TEST_EQ(sizeof(c), wordsize*3); - test_iterator_sizes(c, wordsize); + test_iterator_sizes<c>(wordsize); } { //unordered - typedef unordered_set<node< unordered_set_base_hook<> > > cont_type; - cont_type::bucket_type buckets[1]; - cont_type c(cont_type::bucket_traits(buckets, 1)); + typedef unordered_set<node< unordered_set_base_hook<> > > c; BOOST_TEST_EQ(sizeof(c), wordsize*3); - test_iterator_sizes(c, wordsize*2); + test_iterator_sizes<c>(wordsize*2); } { - typedef unordered_set<node< unordered_set_base_hook<> > , power_2_buckets<true> > cont_type; - cont_type::bucket_type buckets[1]; - cont_type c(cont_type::bucket_traits(buckets, 1)); + typedef unordered_set<node< unordered_set_base_hook<> > , power_2_buckets<true> > c; BOOST_TEST_EQ(sizeof(c), wordsize*3); - test_iterator_sizes(c, wordsize*2); + test_iterator_sizes<c>(wordsize*2); } { - typedef unordered_set<node< unordered_set_base_hook<> >, constant_time_size<false> > cont_type; - cont_type::bucket_type buckets[1]; - cont_type c(cont_type::bucket_traits(buckets, 1)); + typedef unordered_set<node< unordered_set_base_hook<> >, constant_time_size<false> > c; BOOST_TEST_EQ(sizeof(c), wordsize*2); - test_iterator_sizes(c, wordsize*2); + test_iterator_sizes<c>(wordsize*2); } { - typedef unordered_set<node< unordered_set_base_hook< optimize_multikey<true> > >, constant_time_size<false> > cont_type; - cont_type::bucket_type buckets[1]; - cont_type c(cont_type::bucket_traits(buckets, 1)); + typedef unordered_set<node< unordered_set_base_hook< optimize_multikey<true> > >, constant_time_size<false> > c; BOOST_TEST_EQ(sizeof(c), wordsize*2); - test_iterator_sizes(c, wordsize*2); + test_iterator_sizes<c>(wordsize*2); } { - typedef unordered_set<node< unordered_set_base_hook< optimize_multikey<true> > >, incremental<true> > cont_type; - cont_type::bucket_type buckets[1]; - cont_type c(cont_type::bucket_traits(buckets, 1)); + typedef unordered_set<node< unordered_set_base_hook< optimize_multikey<true> > >, incremental<true> > c; BOOST_TEST_EQ(sizeof(c), wordsize*4); - test_iterator_sizes(c, wordsize*2); + test_iterator_sizes<c>(wordsize*2); } } @@ -214,5 +214,3 @@ int main() test_sizes(boolean< pow2_and_equal_sizes<std::size_t, void*>::value >(), sizeof(std::size_t)); return ::boost::report_errors(); } - -#include <boost/intrusive/detail/config_end.hpp> diff --git a/libs/intrusive/test/custom_bucket_traits_test.cpp b/libs/intrusive/test/custom_bucket_traits_test.cpp index 3fe850fa8..843cf8492 100644 --- a/libs/intrusive/test/custom_bucket_traits_test.cpp +++ b/libs/intrusive/test/custom_bucket_traits_test.cpp @@ -12,6 +12,7 @@ #include <boost/intrusive/unordered_set.hpp> #include <boost/intrusive/detail/mpl.hpp> #include <boost/functional/hash.hpp> +#include <boost/static_assert.hpp> #include <vector> using namespace boost::intrusive; @@ -55,16 +56,19 @@ struct uset_value_traits //Base typedef base_hook< unordered_set_base_hook<> > BaseHook; typedef unordered_bucket<BaseHook>::type BaseBucketType; +typedef unordered_bucket_ptr<BaseHook>::type BaseBucketPtrType; typedef unordered_set<MyClass, BaseHook> BaseUset; //Member typedef member_hook < MyClass, unordered_set_member_hook<> , &MyClass::member_hook_ > MemberHook; typedef unordered_bucket<MemberHook>::type MemberBucketType; +typedef unordered_bucket_ptr<MemberHook>::type MemberBucketPtrType; typedef unordered_set<MyClass, MemberHook> MemberUset; //Explicit typedef value_traits< uset_value_traits > Traits; typedef unordered_bucket<Traits>::type TraitsBucketType; +typedef unordered_bucket_ptr<Traits>::type TraitsBucketPtrType; typedef unordered_set<MyClass, Traits> TraitsUset; struct uset_bucket_traits @@ -95,16 +99,14 @@ typedef unordered_set int main() { - if(!detail::is_same<BaseUset::bucket_type, BaseBucketType>::value) - return 1; - if(!detail::is_same<MemberUset::bucket_type, MemberBucketType>::value) - return 1; - if(!detail::is_same<TraitsUset::bucket_type, TraitsBucketType>::value) - return 1; - if(!detail::is_same<BaseBucketType, MemberBucketType>::value) - return 1; - if(!detail::is_same<BaseBucketType, TraitsBucketType>::value) - return 1; + BOOST_STATIC_ASSERT((detail::is_same<BaseUset::bucket_type, BaseBucketType>::value)); + BOOST_STATIC_ASSERT((detail::is_same<MemberUset::bucket_type, MemberBucketType>::value)); + BOOST_STATIC_ASSERT((detail::is_same<TraitsUset::bucket_type, TraitsBucketType>::value)); + BOOST_STATIC_ASSERT((detail::is_same<BaseBucketType, MemberBucketType>::value)); + BOOST_STATIC_ASSERT((detail::is_same<BaseBucketType, TraitsBucketType>::value)); + BOOST_STATIC_ASSERT((detail::is_same<BaseBucketPtrType, TraitsBucketPtrType>::value)); + BOOST_STATIC_ASSERT((detail::is_same<BaseBucketPtrType, MemberBucketPtrType>::value)); + BOOST_STATIC_ASSERT((detail::is_same<BaseBucketPtrType, BaseBucketType*>::value)); typedef std::vector<MyClass>::iterator VectIt; typedef std::vector<MyClass>::reverse_iterator VectRit; diff --git a/libs/intrusive/test/function_hook_test.cpp b/libs/intrusive/test/function_hook_test.cpp index 708983e6d..d352055f4 100644 --- a/libs/intrusive/test/function_hook_test.cpp +++ b/libs/intrusive/test/function_hook_test.cpp @@ -9,7 +9,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include <boost/intrusive/detail/config_begin.hpp> #include <boost/intrusive/parent_from_member.hpp> #include <boost/intrusive/list.hpp> #include <boost/intrusive/slist.hpp> @@ -148,5 +147,3 @@ int main() return 0; } - -#include <boost/intrusive/detail/config_end.hpp> diff --git a/libs/intrusive/test/has_member_function_callable_with.cpp b/libs/intrusive/test/has_member_function_callable_with.cpp index 7839bf90a..9049c4444 100644 --- a/libs/intrusive/test/has_member_function_callable_with.cpp +++ b/libs/intrusive/test/has_member_function_callable_with.cpp @@ -8,12 +8,10 @@ // ////////////////////////////////////////////////////////////////////////////// -#include <boost/intrusive/detail/config_begin.hpp> -#include <boost/intrusive/detail/workaround.hpp> //Just for BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED #include <boost/intrusive/detail/has_member_function_callable_with.hpp> #include <cstddef> -#include <boost/move/move.hpp> +#include <boost/move/utility_core.hpp> namespace boost{ namespace intrusive{ @@ -25,6 +23,12 @@ struct dont_care dont_care(...); }; +template<class T> +struct make_dontcare +{ + typedef has_member_function_callable_with::dont_care type; +}; + struct private_type { static private_type p; @@ -163,21 +167,17 @@ class has_member_function_named_func namespace intrusive{ namespace intrusive_detail{ - - template<typename Fun> - struct funwrap1_func : Fun - { - using Fun::func; - has_member_function_callable_with::private_type - func( has_member_function_callable_with::dont_care) const; - }; - template<typename Fun , class P0> struct has_member_function_callable_with_func_impl <Fun, true , P0 , void , void> { - typedef funwrap1_func<Fun> FunWrap; + struct FunWrap : Fun + { + using Fun::func; + has_member_function_callable_with::private_type + func( has_member_function_callable_with::dont_care) const; + }; static bool const value = (sizeof(has_member_function_callable_with::no_type) == sizeof(has_member_function_callable_with::is_private_type @@ -192,20 +192,16 @@ class has_member_function_named_func namespace intrusive{ namespace intrusive_detail{ - - template<typename Fun> - struct funwrap2_func: Fun - { - using Fun::func; - has_member_function_callable_with::private_type - func( has_member_function_callable_with::dont_care , has_member_function_callable_with::dont_care) const; - }; - template<typename Fun , class P0 , class P1> struct has_member_function_callable_with_func_impl <Fun, true , P0 , P1 , void> { - typedef funwrap2_func<Fun> FunWrap; + struct FunWrap: Fun + { + using Fun::func; + has_member_function_callable_with::private_type + func( has_member_function_callable_with::dont_care , has_member_function_callable_with::dont_care) const; + }; static bool const value = (sizeof(has_member_function_callable_with::no_type) == sizeof(has_member_function_callable_with::is_private_type @@ -222,22 +218,18 @@ class has_member_function_named_func namespace intrusive{ namespace intrusive_detail{ - - template<typename Fun> - struct funwrap3_func: Fun - { - using Fun::func; - has_member_function_callable_with::private_type - func( has_member_function_callable_with::dont_care - , has_member_function_callable_with::dont_care - , has_member_function_callable_with::dont_care) const; - }; - template<typename Fun , class P0 , class P1 , class P2> struct has_member_function_callable_with_func_impl <Fun, true , P0 , P1 , P2 > { - typedef funwrap3_func<Fun> FunWrap; + struct FunWrap: Fun + { + using Fun::func; + has_member_function_callable_with::private_type + func( has_member_function_callable_with::dont_care + , has_member_function_callable_with::dont_care + , has_member_function_callable_with::dont_care) const; + }; static bool const value = (sizeof(has_member_function_callable_with::no_type) == sizeof(has_member_function_callable_with::is_private_type @@ -328,26 +320,19 @@ class has_member_function_named_func namespace intrusive{ namespace intrusive_detail{ - - template<typename Fun, class ...DontCares> - struct funwrap_func : Fun - { - using Fun::func; - has_member_function_callable_with::private_type - func(DontCares...) const; - }; - template<typename Fun, class ...Args> struct has_member_function_callable_with_func_impl <Fun, true , Args...> { - template<class T> - struct make_dontcare + template<class ...DontCares> + struct FunWrapTmpl : Fun { - typedef has_member_function_callable_with::dont_care type; + using Fun::func; + has_member_function_callable_with::private_type + func(DontCares...) const; }; - typedef funwrap_func<Fun, typename make_dontcare<Args>::type...> FunWrap; + typedef FunWrapTmpl<typename has_member_function_callable_with::make_dontcare<Args>::type...> FunWrap; static bool const value = (sizeof(has_member_function_callable_with::no_type) == sizeof(has_member_function_callable_with::is_private_type @@ -473,4 +458,3 @@ int main() return 0; } -#include <boost/intrusive/detail/config_end.hpp> diff --git a/libs/intrusive/test/itestvalue.hpp b/libs/intrusive/test/itestvalue.hpp index 427bfaf5f..793504044 100644 --- a/libs/intrusive/test/itestvalue.hpp +++ b/libs/intrusive/test/itestvalue.hpp @@ -163,6 +163,14 @@ struct is_even { return ((&v1)->value_ & 1) == 0; } }; +struct is_odd +{ + template <typename value_type> + bool operator() + (const value_type& v1) const + { return ((&v1)->value_ & 1) != 0; } +}; + template <typename> struct Value_Container; diff --git a/libs/intrusive/test/list_test.cpp b/libs/intrusive/test/list_test.cpp index 397165cfc..31f2b392d 100644 --- a/libs/intrusive/test/list_test.cpp +++ b/libs/intrusive/test/list_test.cpp @@ -1,3 +1,4 @@ +/* ///////////////////////////////////////////////////////////////////////////// // // (C) Copyright Olaf Krzikalla 2004-2006. @@ -10,7 +11,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include <boost/intrusive/detail/config_begin.hpp> #include <boost/intrusive/list.hpp> #include <boost/intrusive/pointer_traits.hpp> #include "itestvalue.hpp" @@ -21,7 +21,6 @@ #include <boost/detail/lightweight_test.hpp> #include "test_macros.hpp" #include "test_container.hpp" -#include <boost/tti/tti.hpp> #include <typeinfo> using namespace boost::intrusive; @@ -38,8 +37,7 @@ struct hooks typedef list_member_hook< link_mode<auto_unlink> , void_pointer<VoidPointer> > auto_member_hook_type; typedef nonhook_node_member< list_node_traits< VoidPointer >, - circular_list_algorithms - > nonhook_node_member_type; + circular_list_algorithms > nonhook_node_member_type; }; @@ -145,7 +143,25 @@ void test_list< List_Type, Value_Container > TEST_INTRUSIVE_SEQUENCE( init_values, list.begin() ); } { - Value_Container values2(values); // NOTE: problematic copy of value container + 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 }; + 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 }; + TEST_INTRUSIVE_SEQUENCE( init_values, list.begin() ); + } + { + Value_Container values2(values); list_type list(values.begin(), values.end()); list.insert(list.end(), values2.begin(), values2.end()); list.sort(); @@ -394,7 +410,6 @@ class test_main_template std::vector< value_type > >::test_all(data); make_and_test_list < typename detail::get_member_value_traits < - value_type, member_hook< value_type, typename hooks<VoidPointer>::member_hook_type, &value_type::node_> >::type, ConstantTimeSize, @@ -436,7 +451,6 @@ class test_main_template< VoidPointer, false, Default_Holder > std::vector< value_type > >::test_all(data); make_and_test_list < typename detail::get_member_value_traits < - value_type, member_hook< value_type, typename hooks<VoidPointer>::member_hook_type, &value_type::node_> >::type, false, @@ -459,7 +473,6 @@ class test_main_template< VoidPointer, false, Default_Holder > std::vector< value_type > >::test_all(data); make_and_test_list < typename detail::get_member_value_traits < - value_type, member_hook< value_type, typename hooks<VoidPointer>::auto_member_hook_type, &value_type::auto_node_> >::type, false, @@ -522,12 +535,17 @@ int main() 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_main_template<void*, false, false>()(); - test_main_template<void*, true, false>()(); // test (bounded pointers) x ((nonconst/const size) x (special node allocator) test_main_template_bptr< true >()(); test_main_template_bptr< false >()(); return boost::report_errors(); } +*/ + +#include <boost/intrusive/list_hook.hpp> + +int main() +{ + return 0; +}
\ No newline at end of file diff --git a/libs/intrusive/test/make_functions_test.cpp b/libs/intrusive/test/make_functions_test.cpp index dcb8bc4d3..0355412e0 100644 --- a/libs/intrusive/test/make_functions_test.cpp +++ b/libs/intrusive/test/make_functions_test.cpp @@ -19,6 +19,7 @@ #include <boost/intrusive/treap_set.hpp> #include <boost/intrusive/detail/mpl.hpp> #include <boost/intrusive/pointer_traits.hpp> +#include <boost/static_assert.hpp> #include "smart_ptr.hpp" #include <vector> @@ -147,79 +148,54 @@ int main() } //Check defined types and implicitly defined types are equal - if(detail::is_same<make_list_base_hook<void_pointer<void*>, link_mode<safe_link> >::type + BOOST_STATIC_ASSERT((detail::is_same<make_list_base_hook<void_pointer<void*>, link_mode<safe_link> >::type ,make_list_base_hook<>::type - >::value == false){ - return 1; - } + >::value)); - if(detail::is_same<make_slist_base_hook<void_pointer<void*>, link_mode<safe_link> >::type + BOOST_STATIC_ASSERT((detail::is_same<make_slist_base_hook<void_pointer<void*>, link_mode<safe_link> >::type ,make_slist_base_hook<>::type - >::value == false){ - return 1; - } + >::value)); - if(detail::is_same<make_set_base_hook<void_pointer<void*>, link_mode<safe_link> >::type + BOOST_STATIC_ASSERT((detail::is_same<make_set_base_hook<void_pointer<void*>, link_mode<safe_link> >::type ,make_set_base_hook<>::type - >::value == false){ - return 1; - } + >::value)); - if(detail::is_same<make_unordered_set_base_hook<void_pointer<void*>, link_mode<safe_link> >::type + BOOST_STATIC_ASSERT((detail::is_same<make_unordered_set_base_hook<void_pointer<void*>, link_mode<safe_link> >::type ,make_unordered_set_base_hook<>::type - >::value == false){ - return 1; - } + >::value)); - if(detail::is_same<make_avl_set_base_hook<void_pointer<void*>, link_mode<safe_link> >::type + BOOST_STATIC_ASSERT((detail::is_same<make_avl_set_base_hook<void_pointer<void*>, link_mode<safe_link> >::type ,make_avl_set_base_hook<>::type - >::value == false){ - return 1; - } + >::value)); - if(detail::is_same<make_bs_set_base_hook<void_pointer<void*>, link_mode<safe_link> >::type + BOOST_STATIC_ASSERT((detail::is_same<make_bs_set_base_hook<void_pointer<void*>, link_mode<safe_link> >::type ,make_bs_set_base_hook<>::type - >::value == false){ - return 1; - } + >::value)); //Check defined types and implicitly defined types are unequal - if(detail::is_same<make_list_base_hook<void_pointer<void*>, link_mode<normal_link> >::type + BOOST_STATIC_ASSERT(!(detail::is_same<make_list_base_hook<void_pointer<void*>, link_mode<normal_link> >::type ,make_list_base_hook<>::type - >::value == true){ - return 1; - } + >::value)); - if(detail::is_same<make_slist_base_hook<void_pointer<void*>, link_mode<normal_link> >::type + BOOST_STATIC_ASSERT(!(detail::is_same<make_slist_base_hook<void_pointer<void*>, link_mode<normal_link> >::type ,make_slist_base_hook<>::type - >::value == true){ - return 1; - } + >::value)); - if(detail::is_same<make_set_base_hook<void_pointer<void*>, link_mode<normal_link> >::type + BOOST_STATIC_ASSERT(!(detail::is_same<make_set_base_hook<void_pointer<void*>, link_mode<normal_link> >::type ,make_set_base_hook<>::type - >::value == true){ - return 1; - } + >::value)); - if(detail::is_same<make_unordered_set_base_hook<void_pointer<void*>, link_mode<normal_link> >::type + BOOST_STATIC_ASSERT(!(detail::is_same<make_unordered_set_base_hook<void_pointer<void*>, link_mode<normal_link> >::type ,make_unordered_set_base_hook<>::type - >::value == true){ - return 1; - } + >::value)); - if(detail::is_same<make_avl_set_base_hook<void_pointer<void*>, link_mode<normal_link> >::type + BOOST_STATIC_ASSERT(!(detail::is_same<make_avl_set_base_hook<void_pointer<void*>, link_mode<normal_link> >::type ,make_avl_set_base_hook<>::type - >::value == true){ - return 1; - } + >::value)); - if(detail::is_same<make_bs_set_base_hook<void_pointer<void*>, link_mode<normal_link> >::type + BOOST_STATIC_ASSERT(!(detail::is_same<make_bs_set_base_hook<void_pointer<void*>, link_mode<normal_link> >::type ,make_bs_set_base_hook<>::type - >::value == true){ - return 1; - } - + >::value)); return 0; } diff --git a/libs/intrusive/test/multiset_test.cpp b/libs/intrusive/test/multiset_test.cpp index 77db6e88c..1496c5647 100644 --- a/libs/intrusive/test/multiset_test.cpp +++ b/libs/intrusive/test/multiset_test.cpp @@ -10,7 +10,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include <boost/intrusive/detail/config_begin.hpp> #include <boost/intrusive/set.hpp> #include "itestvalue.hpp" #include "bptr_value.hpp" @@ -123,8 +122,7 @@ class test_main_template , GetContainer_With_Holder< Default_Holder >::template GetContainer >::test_all(); test::test_generic_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -159,8 +157,7 @@ class test_main_template<VoidPointer, false, Default_Holder> >::test_all(); test::test_generic_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -176,8 +173,7 @@ class test_main_template<VoidPointer, false, Default_Holder> >::test_all(); test::test_generic_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::auto_member_hook_type , &value_type::auto_node_ > @@ -239,14 +235,9 @@ int main() 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_main_template<void*, false, false>()(); - test_main_template<void*, true, false>()(); // test (bounded pointers) x (nonconst/const size) x (special node allocator) test_main_template_bptr< true >()(); test_main_template_bptr< false >()(); return boost::report_errors(); } - -#include <boost/intrusive/detail/config_end.hpp> diff --git a/libs/intrusive/test/nonhook_node.hpp b/libs/intrusive/test/nonhook_node.hpp index bc0d9b691..f862801b6 100644 --- a/libs/intrusive/test/nonhook_node.hpp +++ b/libs/intrusive/test/nonhook_node.hpp @@ -15,7 +15,6 @@ #include <boost/intrusive/detail/config_begin.hpp> #include <boost/intrusive/pointer_traits.hpp> -#include <boost/intrusive/detail/utilities.hpp> #include <boost/detail/lightweight_test.hpp> #include <boost/static_assert.hpp> diff --git a/libs/intrusive/test/null_iterator_test.cpp b/libs/intrusive/test/null_iterator_test.cpp new file mode 100644 index 000000000..72a68f225 --- /dev/null +++ b/libs/intrusive/test/null_iterator_test.cpp @@ -0,0 +1,95 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2014-2014. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/container for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +#include <boost/intrusive/list.hpp> +#include <boost/intrusive/slist.hpp> +#include <boost/intrusive/bs_set.hpp> +#include <boost/intrusive/set.hpp> +#include <boost/intrusive/avl_set.hpp> +#include <boost/intrusive/sg_set.hpp> +#include <boost/intrusive/treap_set.hpp> +#include <boost/intrusive/splay_set.hpp> +#include <boost/intrusive/detail/memory_util.hpp> + +#include <boost/core/lightweight_test.hpp> +#include <boost/aligned_storage.hpp> +#include <boost/static_assert.hpp> +#include <cstring> +#include <new> + +using namespace boost::intrusive; + +struct Type + : list_base_hook<> + , slist_base_hook<> + , set_base_hook<> + , avl_set_base_hook<> + , bs_set_base_hook<> +{}; + +typedef boost::aligned_storage<sizeof(void*)*4>::type buffer_t; + +static buffer_t buffer_0x00; +static buffer_t buffer_0xFF; + +template<class Iterator> +const Iterator &on_0x00_buffer() +{ + BOOST_STATIC_ASSERT(sizeof(buffer_t) >= sizeof(Iterator)); + return * ::new(std::memset(&buffer_0x00, 0x00, sizeof(buffer_0x00))) Iterator(); +} + +template<class Iterator> +const Iterator &on_0xFF_buffer() +{ + BOOST_STATIC_ASSERT(sizeof(buffer_t) >= sizeof(Iterator)); + return * ::new(std::memset(&buffer_0xFF, 0xFF, sizeof(buffer_0xFF))) Iterator(); +} + +BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(reverse_iterator) +BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(const_reverse_iterator) + + +template<class Container> +void check_null_iterators() +{ + typedef typename Container::iterator iterator; + typedef typename Container::const_iterator const_iterator; + typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT + (::, Container + ,reverse_iterator, iterator) reverse_iterator; + typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT + (::, Container + ,const_reverse_iterator, const_iterator) const_reverse_iterator; + + BOOST_TEST(on_0xFF_buffer<iterator>() == on_0x00_buffer<iterator>()); + BOOST_TEST(on_0xFF_buffer<const_iterator>() == on_0x00_buffer<const_iterator>()); + BOOST_TEST(on_0xFF_buffer<reverse_iterator>() == on_0x00_buffer<reverse_iterator>()); + BOOST_TEST(on_0xFF_buffer<const_reverse_iterator>() == on_0x00_buffer<const_reverse_iterator>()); +} + +int main() +{ + check_null_iterators< list<Type> >(); + check_null_iterators< slist<Type> >(); + check_null_iterators< bs_set<Type> >(); + check_null_iterators< set<Type> >(); + check_null_iterators< multiset<Type> >(); + check_null_iterators< avl_set<Type> >(); + check_null_iterators< avl_multiset<Type> >(); + check_null_iterators< sg_set<Type> >(); + check_null_iterators< sg_multiset<Type> >(); + check_null_iterators< treap_set<Type> >(); + check_null_iterators< treap_multiset<Type> >(); + check_null_iterators< splay_set<Type> >(); + check_null_iterators< splay_multiset<Type> >(); + + return boost::report_errors(); +} diff --git a/libs/intrusive/test/pack_options_test.cpp b/libs/intrusive/test/pack_options_test.cpp index 2f0ef09ae..2df1c0fe5 100644 --- a/libs/intrusive/test/pack_options_test.cpp +++ b/libs/intrusive/test/pack_options_test.cpp @@ -7,12 +7,9 @@ // See http://www.boost.org/libs/intrusive for documentation. // ////////////////////////////////////////////////////////////////////////////// -#include <boost/intrusive/detail/config_begin.hpp> -#include <boost/type_traits/is_same.hpp> -#include <boost/type_traits/remove_pointer.hpp> -#include <boost/type_traits/add_pointer.hpp> -#include <boost/static_assert.hpp> #include <boost/intrusive/pack_options.hpp> +#include <boost/intrusive/detail/mpl.hpp> +#include <boost/static_assert.hpp> struct empty_default{}; @@ -24,9 +21,9 @@ const bool is_incremental_value = pack_options< empty_default, incremental<true> BOOST_STATIC_ASSERT(( is_incremental_value == true )); //Test BOOST_INTRUSIVE_OPTION_TYPE -BOOST_INTRUSIVE_OPTION_TYPE(my_pointer, VoidPointer, typename boost::remove_pointer<VoidPointer>::type, my_pointer_type) +BOOST_INTRUSIVE_OPTION_TYPE(my_pointer, VoidPointer, typename boost::intrusive::detail::remove_pointer<VoidPointer>::type, my_pointer_type) typedef pack_options< empty_default, my_pointer<void*> >::type::my_pointer_type my_pointer_type; -BOOST_STATIC_ASSERT(( boost::is_same<my_pointer_type, void>::value )); +BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<my_pointer_type, void>::value )); //test combination of BOOST_INTRUSIVE_OPTION_CONSTANT and BOOST_INTRUSIVE_OPTION_TYPE // First add new options @@ -37,7 +34,7 @@ struct default_options }; BOOST_INTRUSIVE_OPTION_CONSTANT(incremental2, bool, Enabled, is_incremental2) -BOOST_INTRUSIVE_OPTION_TYPE(my_pointer2, VoidPointer, typename boost::add_pointer<VoidPointer>::type, my_pointer_type2) +BOOST_INTRUSIVE_OPTION_TYPE(my_pointer2, VoidPointer, typename boost::intrusive::detail::add_pointer<VoidPointer>::type, my_pointer_type2) typedef pack_options < default_options , incremental<false> , my_pointer<float*> @@ -46,15 +43,13 @@ typedef pack_options < default_options >::type combined_type; BOOST_STATIC_ASSERT(( combined_type::is_incremental == false )); BOOST_STATIC_ASSERT(( combined_type::is_incremental2 == true )); -BOOST_STATIC_ASSERT(( boost::is_same<combined_type::my_pointer_type, float >::value )); -BOOST_STATIC_ASSERT(( boost::is_same<combined_type::my_pointer_type2, const char**>::value )); +BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<combined_type::my_pointer_type, float >::value )); +BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<combined_type::my_pointer_type2, const char**>::value )); //test packing the default options leads to a default options type -BOOST_STATIC_ASSERT(( boost::is_same<pack_options<default_options>::type, default_options>::value )); +BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<pack_options<default_options>::type, default_options>::value )); int main() { return 0; } - -#include <boost/intrusive/detail/config_end.hpp> diff --git a/libs/intrusive/test/parent_from_member_test.cpp b/libs/intrusive/test/parent_from_member_test.cpp new file mode 100644 index 000000000..03910452a --- /dev/null +++ b/libs/intrusive/test/parent_from_member_test.cpp @@ -0,0 +1,155 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2014-2014 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// +#include <boost/intrusive/parent_from_member.hpp> +#include <boost/core/lightweight_test.hpp> + +struct POD +{ + int int_; + float float_; +}pod; + +struct Derived + : public POD +{ + int derived_int_; + float derived_float_; +}derived; + +struct Abstract +{ + int abstract_int_; + float abstract_float_; + virtual void virtual_func1() = 0; + virtual void virtual_func2() = 0; + virtual ~Abstract(){} +}; + +struct DerivedPoly + : public Abstract +{ + int derivedpoly_int_; + float derivedpoly_float_; + virtual void virtual_func1(){} + virtual void virtual_func2(){} + Abstract *abstract() { return this; } + Abstract const *abstract() const { return this; } +} derivedpoly; + +struct MultiInheritance + : public Derived, public DerivedPoly +{ + int multiinheritance_int_; + float multiinheritance_float_; +} multiinheritance; + +struct Abstract2 +{ + int abstract2_int_; + float abstract2_float_; + virtual void virtual_func1() = 0; + virtual void virtual_func2() = 0; + virtual ~Abstract2(){} +}; + +struct DerivedPoly2 + : public Abstract2 +{ + int derivedpoly2_int_; + float derivedpoly2_float_; + virtual void virtual_func1(){} + virtual void virtual_func2(){} + Abstract2 *abstract2() { return this; } + Abstract2 const *abstract2() const { return this; } +} derivedpoly2; + +struct MultiInheritance2 + : public DerivedPoly, public DerivedPoly2 +{ + int multiinheritance2_int_; + float multiinheritance2_float_; +} multiinheritance2; + +struct VirtualDerived + : public virtual Derived +{ + int virtualderived_int_; + float virtualderived_float_; + virtual void f1(){} + virtual void f2(){} +} virtualderived; + +struct VirtualMultipleDerived + : public virtual Derived, virtual public DerivedPoly +{ + int virtualmultiplederived_int_; + float virtualmultiplederived_float_; + virtual void f1(){} + virtual void f2(){} +} virtualmultiplederived; + +using namespace boost::intrusive; + +int main() +{ + //POD + BOOST_TEST(&pod == get_parent_from_member(&pod.int_, &POD::int_)); + BOOST_TEST(&pod == get_parent_from_member(&pod.float_, &POD::float_)); + + //Derived + BOOST_TEST(&derived == get_parent_from_member(&derived.int_, &Derived::int_)); + BOOST_TEST(&derived == get_parent_from_member(&derived.float_, &Derived::float_)); + BOOST_TEST(&derived == get_parent_from_member(&derived.derived_int_, &Derived::derived_int_)); + BOOST_TEST(&derived == get_parent_from_member(&derived.derived_float_, &Derived::derived_float_)); + + //Abstract + BOOST_TEST(derivedpoly.abstract() == get_parent_from_member(&derivedpoly.abstract_int_, &Abstract::abstract_int_)); + BOOST_TEST(derivedpoly.abstract() == get_parent_from_member(&derivedpoly.abstract_float_, &Abstract::abstract_float_)); + + //DerivedPoly + BOOST_TEST(&derivedpoly == get_parent_from_member(&derivedpoly.abstract_int_, &DerivedPoly::abstract_int_)); + BOOST_TEST(&derivedpoly == get_parent_from_member(&derivedpoly.abstract_float_, &DerivedPoly::abstract_float_)); + BOOST_TEST(&derivedpoly == get_parent_from_member(&derivedpoly.derivedpoly_int_, &DerivedPoly::derivedpoly_int_)); + BOOST_TEST(&derivedpoly == get_parent_from_member(&derivedpoly.derivedpoly_float_, &DerivedPoly::derivedpoly_float_)); + + //MultiInheritance + BOOST_TEST(multiinheritance.abstract() == get_parent_from_member(&multiinheritance.abstract_int_, &MultiInheritance::abstract_int_)); + BOOST_TEST(multiinheritance.abstract() == get_parent_from_member(&multiinheritance.abstract_float_, &MultiInheritance::abstract_float_)); + BOOST_TEST(&multiinheritance == get_parent_from_member(&multiinheritance.derivedpoly_int_, &MultiInheritance::derivedpoly_int_)); + BOOST_TEST(&multiinheritance == get_parent_from_member(&multiinheritance.derivedpoly_float_, &MultiInheritance::derivedpoly_float_)); + BOOST_TEST(&multiinheritance == get_parent_from_member(&multiinheritance.int_, &MultiInheritance::int_)); + BOOST_TEST(&multiinheritance == get_parent_from_member(&multiinheritance.float_, &MultiInheritance::float_)); + BOOST_TEST(&multiinheritance == get_parent_from_member(&multiinheritance.derived_int_, &MultiInheritance::derived_int_)); + BOOST_TEST(&multiinheritance == get_parent_from_member(&multiinheritance.derived_float_, &MultiInheritance::derived_float_)); + + BOOST_TEST(multiinheritance.abstract() == get_parent_from_member(&multiinheritance.abstract_int_, &MultiInheritance::abstract_int_)); + BOOST_TEST(multiinheritance.abstract() == get_parent_from_member(&multiinheritance.abstract_float_, &MultiInheritance::abstract_float_)); + BOOST_TEST(&multiinheritance == get_parent_from_member(&multiinheritance.derivedpoly_int_, &MultiInheritance::derivedpoly_int_)); + BOOST_TEST(&multiinheritance == get_parent_from_member(&multiinheritance.derivedpoly_float_, &MultiInheritance::derivedpoly_float_)); + BOOST_TEST(multiinheritance2.abstract2() == get_parent_from_member(&multiinheritance2.abstract2_int_, &MultiInheritance2::abstract2_int_)); + BOOST_TEST(multiinheritance2.abstract2() == get_parent_from_member(&multiinheritance2.abstract2_float_, &MultiInheritance2::abstract2_float_)); + BOOST_TEST(&multiinheritance2 == get_parent_from_member(&multiinheritance2.derivedpoly2_int_, &MultiInheritance2::derivedpoly2_int_)); + BOOST_TEST(&multiinheritance2 == get_parent_from_member(&multiinheritance2.derivedpoly2_float_, &MultiInheritance2::derivedpoly2_float_)); + + //MSVC pointer to member data uses RTTI info even when not crossing virtual base boundaries + #ifdef BOOST_INTRUSIVE_MSVC_ABI_PTR_TO_MEMBER + //No access to virtual base data {int_, float_, derived_int_, derived_float_} + BOOST_TEST(&virtualderived == get_parent_from_member(&virtualderived.virtualderived_int_, &VirtualDerived::virtualderived_int_)); + BOOST_TEST(&virtualderived == get_parent_from_member(&virtualderived.virtualderived_float_, &VirtualDerived::virtualderived_float_)); + BOOST_TEST(&virtualmultiplederived == get_parent_from_member(&virtualmultiplederived.virtualmultiplederived_float_, &VirtualMultipleDerived::virtualmultiplederived_float_)); + BOOST_TEST(&virtualmultiplederived == get_parent_from_member(&virtualmultiplederived.virtualmultiplederived_int_, &VirtualMultipleDerived::virtualmultiplederived_int_)); + BOOST_TEST(&virtualmultiplederived == get_parent_from_member(&virtualmultiplederived.derivedpoly_float_, &VirtualMultipleDerived::derivedpoly_float_)); + BOOST_TEST(&virtualmultiplederived == get_parent_from_member(&virtualmultiplederived.derivedpoly_int_, &VirtualMultipleDerived::derivedpoly_int_)); + #endif + + return boost::report_errors(); +} diff --git a/libs/intrusive/test/pointer_traits_test.cpp b/libs/intrusive/test/pointer_traits_test.cpp index 1deda450d..8c70fcb3b 100644 --- a/libs/intrusive/test/pointer_traits_test.cpp +++ b/libs/intrusive/test/pointer_traits_test.cpp @@ -7,8 +7,7 @@ // See http://www.boost.org/libs/intrusive for documentation. // ////////////////////////////////////////////////////////////////////////////// -#include <boost/intrusive/detail/config_begin.hpp> -#include <boost/type_traits/is_same.hpp> +#include <boost/intrusive/detail/mpl.hpp> #include <boost/static_assert.hpp> #include <boost/intrusive/pointer_traits.hpp> @@ -120,13 +119,13 @@ int main() int dummy; //Raw pointer - BOOST_STATIC_ASSERT(( boost::is_same<boost::intrusive::pointer_traits + BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits <int*>::element_type, int>::value )); - BOOST_STATIC_ASSERT(( boost::is_same<boost::intrusive::pointer_traits + BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits <int*>::pointer, int*>::value )); - BOOST_STATIC_ASSERT(( boost::is_same<boost::intrusive::pointer_traits + BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits <int*>::difference_type, std::ptrdiff_t>::value )); - BOOST_STATIC_ASSERT(( boost::is_same<boost::intrusive::pointer_traits + BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits <int*>::rebind_pointer<double>::type , double*>::value )); if(boost::intrusive::pointer_traits<int*>::pointer_to(dummy) != &dummy){ @@ -143,13 +142,13 @@ int main() } //Complete smart pointer - BOOST_STATIC_ASSERT(( boost::is_same<boost::intrusive::pointer_traits + BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits < CompleteSmartPtr<int> >::element_type, int>::value )); - BOOST_STATIC_ASSERT(( boost::is_same<boost::intrusive::pointer_traits + BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits < CompleteSmartPtr<int> >::pointer, CompleteSmartPtr<int> >::value )); - BOOST_STATIC_ASSERT(( boost::is_same<boost::intrusive::pointer_traits + BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits < CompleteSmartPtr<int> >::difference_type, char>::value )); - BOOST_STATIC_ASSERT(( boost::is_same<boost::intrusive::pointer_traits + BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits < CompleteSmartPtr<int> >::rebind_pointer<double>::type , CompleteSmartPtr<double> >::value )); if(boost::intrusive::pointer_traits< CompleteSmartPtr<int> > @@ -170,13 +169,13 @@ int main() } //Simple smart pointer - BOOST_STATIC_ASSERT(( boost::is_same<boost::intrusive::pointer_traits + BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits < SimpleSmartPtr<int> >::element_type, int>::value )); - BOOST_STATIC_ASSERT(( boost::is_same<boost::intrusive::pointer_traits + BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits < SimpleSmartPtr<int> >::pointer, SimpleSmartPtr<int> >::value )); - BOOST_STATIC_ASSERT(( boost::is_same<boost::intrusive::pointer_traits + BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits < SimpleSmartPtr<int> >::difference_type, std::ptrdiff_t>::value )); - BOOST_STATIC_ASSERT(( boost::is_same<boost::intrusive::pointer_traits + BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits < SimpleSmartPtr<int> >::rebind_pointer<double>::type , SimpleSmartPtr<double> >::value )); if(boost::intrusive::pointer_traits< SimpleSmartPtr<int> > @@ -197,5 +196,3 @@ int main() } return 0; } - -#include <boost/intrusive/detail/config_end.hpp> diff --git a/libs/intrusive/test/set_test.cpp b/libs/intrusive/test/set_test.cpp index 25b75fc50..feeefc0fb 100644 --- a/libs/intrusive/test/set_test.cpp +++ b/libs/intrusive/test/set_test.cpp @@ -10,8 +10,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include <boost/intrusive/detail/config_begin.hpp> - #include <boost/intrusive/set.hpp> #include "itestvalue.hpp" #include "bptr_value.hpp" @@ -124,8 +122,7 @@ class test_main_template , GetContainer_With_Holder< Default_Holder >::template GetContainer >::test_all(); test::test_generic_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -160,8 +157,7 @@ class test_main_template<VoidPointer, false, Default_Holder> >::test_all(); test::test_generic_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -177,8 +173,7 @@ class test_main_template<VoidPointer, false, Default_Holder> >::test_all(); test::test_generic_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::auto_member_hook_type , &value_type::auto_node_ > @@ -242,14 +237,9 @@ int main() 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_main_template<void*, false, false>()(); - test_main_template<void*, true, false>()(); // test (bounded pointers) x (nonconst/const size) x (special node allocator) test_main_template_bptr< true >()(); test_main_template_bptr< false >()(); return boost::report_errors(); } - -#include <boost/intrusive/detail/config_end.hpp> diff --git a/libs/intrusive/test/sg_multiset_test.cpp b/libs/intrusive/test/sg_multiset_test.cpp index 584f49925..4658c8e1e 100644 --- a/libs/intrusive/test/sg_multiset_test.cpp +++ b/libs/intrusive/test/sg_multiset_test.cpp @@ -10,7 +10,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include <boost/intrusive/detail/config_begin.hpp> #include <boost/intrusive/sg_set.hpp> #include "itestvalue.hpp" #include "bptr_value.hpp" @@ -214,8 +213,7 @@ class test_main_template , GetContainer_With_Holder< Default_Holder >::template GetContainer >::test_all(); test::test_generic_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -229,8 +227,7 @@ class test_main_template , GetContainerFixedAlpha_With_Holder< Default_Holder >::template GetContainerFixedAlpha >::test_all(); test::test_generic_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -273,7 +270,6 @@ struct Get_Preset_Container }; }; -template < bool ConstantTimeSize > struct test_main_template_bptr { void operator () () @@ -284,8 +280,8 @@ struct test_main_template_bptr allocator_type::init(); test::test_generic_multiset< value_traits, - Get_Preset_Container< value_traits, ConstantTimeSize, - bounded_pointer_holder< value_type > >::template GetContainer + Get_Preset_Container< value_traits, true, + bounded_pointer_holder< value_type > >::GetContainer >::test_all(); assert(allocator_type::is_clear()); allocator_type::destroy(); @@ -297,11 +293,8 @@ int main() // test (plain/smart pointers) x (const size) x (void node allocator) test_main_template<void*, true>()(); test_main_template<boost::intrusive::smart_ptr<void>, true >()(); - // test (plain pointers) x (const size) x (standard node allocator) - test_main_template<void*, false>()(); // test (bounded pointers) x (nonconst/const size) x (special node allocator) - test_main_template_bptr< true >()(); - test_main_template_bptr< false >()(); + test_main_template_bptr()(); return boost::report_errors(); } diff --git a/libs/intrusive/test/sg_set_test.cpp b/libs/intrusive/test/sg_set_test.cpp index 104f9dae0..0cb1da668 100644 --- a/libs/intrusive/test/sg_set_test.cpp +++ b/libs/intrusive/test/sg_set_test.cpp @@ -9,7 +9,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include <boost/intrusive/detail/config_begin.hpp> #include <boost/intrusive/sg_set.hpp> #include "itestvalue.hpp" #include "bptr_value.hpp" @@ -211,8 +210,7 @@ class test_main_template , GetContainer_With_Holder< Default_Holder >::template GetContainer >::test_all(); test::test_generic_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -227,8 +225,7 @@ class test_main_template , GetContainerFixedAlpha_With_Holder< Default_Holder >::template GetContainerFixedAlpha >::test_all(); test::test_generic_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -271,7 +268,6 @@ struct Get_Preset_Container }; }; -template < bool ConstantTimeSize > struct test_main_template_bptr { void operator () () @@ -282,8 +278,8 @@ struct test_main_template_bptr allocator_type::init(); test::test_generic_set< value_traits, - Get_Preset_Container< value_traits, ConstantTimeSize, - bounded_pointer_holder< value_type > >::template GetContainer + Get_Preset_Container< value_traits, true, + bounded_pointer_holder< value_type > >::GetContainer >::test_all(); assert(allocator_type::is_clear()); allocator_type::destroy(); @@ -298,9 +294,7 @@ int main() // test (plain pointers) x (const size) x (standard node allocator) test_main_template<void*, false>()(); // test (bounded pointers) x (nonconst/const size) x (special node allocator) - test_main_template_bptr< true >()(); - test_main_template_bptr< false >()(); + test_main_template_bptr()(); return boost::report_errors(); } -#include <boost/intrusive/detail/config_end.hpp> diff --git a/libs/intrusive/test/slist_test.cpp b/libs/intrusive/test/slist_test.cpp index f455243ac..7398e4a6c 100644 --- a/libs/intrusive/test/slist_test.cpp +++ b/libs/intrusive/test/slist_test.cpp @@ -11,7 +11,6 @@ // ///////////////////////////////////////////////////////////////////////////// -#include <boost/intrusive/detail/config_begin.hpp> #include <boost/intrusive/slist.hpp> #include <boost/intrusive/pointer_traits.hpp> #include "itestvalue.hpp" @@ -31,12 +30,12 @@ struct my_tag; template<class VoidPointer> struct hooks { - typedef slist_base_hook<void_pointer<VoidPointer> > base_hook_type; + typedef slist_base_hook<void_pointer<VoidPointer> > base_hook_type; typedef slist_base_hook< link_mode<auto_unlink> - , void_pointer<VoidPointer>, tag<my_tag> > auto_base_hook_type; - typedef slist_member_hook<void_pointer<VoidPointer>, tag<my_tag> > member_hook_type; + , void_pointer<VoidPointer>, tag<my_tag> > auto_base_hook_type; + typedef slist_member_hook<void_pointer<VoidPointer>, tag<my_tag> > member_hook_type; typedef slist_member_hook< link_mode<auto_unlink> - , void_pointer<VoidPointer> > auto_member_hook_type; + , void_pointer<VoidPointer> > auto_member_hook_type; typedef nonhook_node_member< slist_node_traits< VoidPointer >, circular_slist_algorithms > nonhook_node_member_type; @@ -160,6 +159,24 @@ void test_slist< List_Type, Value_Container > 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 }; + 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 }; + TEST_INTRUSIVE_SEQUENCE( init_values, list.begin() ); + } + { Value_Container values2(values); list_type list(values.begin(), values.end()); list.insert_after(list.before_begin(), values2.begin(), values2.end()); @@ -476,8 +493,7 @@ class test_main_template , std::vector< value_type > >::test_all(data); make_and_test_slist < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -513,8 +529,7 @@ class test_main_template >::test_all(data); make_and_test_slist < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -538,8 +553,7 @@ class test_main_template , std::vector< value_type > >::test_all(data); make_and_test_slist < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -564,8 +578,7 @@ class test_main_template >::test_all(data); make_and_test_slist < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -603,8 +616,7 @@ class test_main_template<VoidPointer, false, Default_Holder> >::test_all(data); make_and_test_slist < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -628,8 +640,7 @@ class test_main_template<VoidPointer, false, Default_Holder> >::test_all(data); make_and_test_slist < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::auto_member_hook_type , &value_type::auto_node_ > @@ -653,8 +664,7 @@ class test_main_template<VoidPointer, false, Default_Holder> >::test_all(data); make_and_test_slist < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -679,8 +689,7 @@ class test_main_template<VoidPointer, false, Default_Holder> >::test_all(data); make_and_test_slist < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -704,8 +713,7 @@ class test_main_template<VoidPointer, false, Default_Holder> >::test_all(data); make_and_test_slist < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -765,9 +773,6 @@ int main(int, char* []) 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_main_template<void*, false, false>()(); - test_main_template<void*, true, false>()(); // test (bounded pointers) x ((nonconst/const size) x (special node allocator) test_main_template_bptr< true >()(); test_main_template_bptr< false >()(); @@ -775,4 +780,3 @@ int main(int, char* []) return boost::report_errors(); } -#include <boost/intrusive/detail/config_end.hpp> diff --git a/libs/intrusive/test/splay_multiset_test.cpp b/libs/intrusive/test/splay_multiset_test.cpp index 54a2f7861..82cc4460f 100644 --- a/libs/intrusive/test/splay_multiset_test.cpp +++ b/libs/intrusive/test/splay_multiset_test.cpp @@ -10,7 +10,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include <boost/intrusive/detail/config_begin.hpp> #include <boost/intrusive/splay_set.hpp> #include <boost/intrusive/pointer_traits.hpp> #include "itestvalue.hpp" @@ -154,8 +153,7 @@ class test_main_template , GetContainer_With_Holder< Default_Holder >::template GetContainer >::test_all(); test::test_generic_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -191,10 +189,9 @@ class test_main_template<VoidPointer, false, Default_Holder> >::test_all(); test::test_generic_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type - , typename hooks<VoidPointer>::member_hook_type - , &value_type::node_ + < member_hook< value_type + , typename hooks<VoidPointer>::member_hook_type + , &value_type::node_ > >::type , GetContainer_With_Holder< Default_Holder >::template GetContainer @@ -208,11 +205,10 @@ class test_main_template<VoidPointer, false, Default_Holder> >::test_all(); test::test_generic_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type - , typename hooks<VoidPointer>::auto_member_hook_type - , &value_type::auto_node_ - > + < member_hook< value_type + , typename hooks<VoidPointer>::auto_member_hook_type + , &value_type::auto_node_ + > >::type , GetContainer_With_Holder< Default_Holder >::template GetContainer >::test_all(); @@ -271,9 +267,6 @@ int main() 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_main_template<void*, false, false>()(); - test_main_template<void*, true, false>()(); // test (bounded pointers) x (nonconst/const size) x (special node allocator) test_main_template_bptr< true >()(); test_main_template_bptr< false >()(); diff --git a/libs/intrusive/test/splay_set_test.cpp b/libs/intrusive/test/splay_set_test.cpp index c7ccd3fbe..5082908d3 100644 --- a/libs/intrusive/test/splay_set_test.cpp +++ b/libs/intrusive/test/splay_set_test.cpp @@ -9,7 +9,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include <boost/intrusive/detail/config_begin.hpp> #include <boost/intrusive/splay_set.hpp> #include "itestvalue.hpp" #include "bptr_value.hpp" @@ -151,8 +150,7 @@ class test_main_template , GetContainer_With_Holder< Default_Holder >::template GetContainer >::test_all(); test::test_generic_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -187,8 +185,7 @@ class test_main_template<VoidPointer, false, Default_Holder> >::test_all(); test::test_generic_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -204,8 +201,7 @@ class test_main_template<VoidPointer, false, Default_Holder> >::test_all(); test::test_generic_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::auto_member_hook_type , &value_type::auto_node_ > @@ -268,13 +264,9 @@ int main() 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_main_template<void*, false, false>()(); - test_main_template<void*, true, false>()(); // test (bounded pointers) x (nonconst/const size) x (special node allocator) test_main_template_bptr< true >()(); test_main_template_bptr< false >()(); return boost::report_errors(); } -#include <boost/intrusive/detail/config_end.hpp> diff --git a/libs/intrusive/test/test_container.hpp b/libs/intrusive/test/test_container.hpp index fbddaecec..13f6f2210 100644 --- a/libs/intrusive/test/test_container.hpp +++ b/libs/intrusive/test/test_container.hpp @@ -15,7 +15,8 @@ #include <boost/detail/lightweight_test.hpp> #include <boost/intrusive/detail/mpl.hpp> -#include <boost/move/move.hpp> +#include <boost/intrusive/detail/simple_disposers.hpp> +#include <boost/move/utility_core.hpp> namespace boost { namespace intrusive { @@ -73,6 +74,7 @@ void test_container( Container & c ) BOOST_TEST( it == itend ); BOOST_TEST( c.size() == i ); } + static_cast<const Container&>(c).check(); } diff --git a/libs/intrusive/test/treap_multiset_test.cpp b/libs/intrusive/test/treap_multiset_test.cpp index ebea5620d..ef7481dcc 100644 --- a/libs/intrusive/test/treap_multiset_test.cpp +++ b/libs/intrusive/test/treap_multiset_test.cpp @@ -10,8 +10,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// - -#include <boost/intrusive/detail/config_begin.hpp> #include <boost/intrusive/treap_set.hpp> #include "itestvalue.hpp" #include "bptr_value.hpp" @@ -120,8 +118,7 @@ class test_main_template , GetContainer_With_Holder< Default_Holder >::template GetContainer >::test_all(); test::test_generic_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -156,8 +153,7 @@ class test_main_template<VoidPointer, false, Default_Holder> >::test_all(); test::test_generic_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -173,8 +169,7 @@ class test_main_template<VoidPointer, false, Default_Holder> >::test_all(); test::test_generic_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::auto_member_hook_type , &value_type::auto_node_ > @@ -236,14 +231,9 @@ int main() 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_main_template<void*, false, false>()(); - test_main_template<void*, true, false>()(); // test (bounded pointers) x (nonconst/const size) x (special node allocator) test_main_template_bptr< true >()(); test_main_template_bptr< false >()(); return boost::report_errors(); } - -#include <boost/intrusive/detail/config_end.hpp> diff --git a/libs/intrusive/test/treap_set_test.cpp b/libs/intrusive/test/treap_set_test.cpp index abc9be25e..727c56972 100644 --- a/libs/intrusive/test/treap_set_test.cpp +++ b/libs/intrusive/test/treap_set_test.cpp @@ -9,7 +9,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include <boost/intrusive/detail/config_begin.hpp> #include <boost/intrusive/treap_set.hpp> #include "itestvalue.hpp" #include "bptr_value.hpp" @@ -135,8 +134,7 @@ class test_main_template , GetContainer_With_Holder< Default_Holder >::template GetContainer >::test_all(); test::test_generic_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -171,8 +169,7 @@ class test_main_template<VoidPointer, false, Default_Holder> >::test_all(); test::test_generic_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -188,8 +185,7 @@ class test_main_template<VoidPointer, false, Default_Holder> >::test_all(); test::test_generic_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::auto_member_hook_type , &value_type::auto_node_ > @@ -252,14 +248,9 @@ int main() 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_main_template<void*, false, false>()(); - test_main_template<void*, true, false>()(); // test (bounded pointers) x (nonconst/const size) x (special node allocator) test_main_template_bptr< true >()(); test_main_template_bptr< false >()(); return boost::report_errors(); } - -#include <boost/intrusive/detail/config_end.hpp> diff --git a/libs/intrusive/test/unordered_multiset_test.cpp b/libs/intrusive/test/unordered_multiset_test.cpp index a4f6d0cf8..714460304 100644 --- a/libs/intrusive/test/unordered_multiset_test.cpp +++ b/libs/intrusive/test/unordered_multiset_test.cpp @@ -10,7 +10,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include <boost/intrusive/detail/config_begin.hpp> #include <boost/intrusive/unordered_set.hpp> #include <boost/intrusive/pointer_traits.hpp> #include "itestvalue.hpp" @@ -780,8 +779,7 @@ class test_main_template >::test_all(data); test_unordered_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -825,8 +823,7 @@ class test_main_template<VoidPointer, false, Incremental> >::test_all(data); test_unordered_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -846,8 +843,7 @@ class test_main_template<VoidPointer, false, Incremental> >::test_all(data); test_unordered_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::auto_member_hook_type , &value_type::auto_node_ > @@ -872,5 +868,3 @@ int main() test_main_template<smart_ptr<void>, true, false>()(); return boost::report_errors(); } - -#include <boost/intrusive/detail/config_end.hpp> diff --git a/libs/intrusive/test/unordered_set_test.cpp b/libs/intrusive/test/unordered_set_test.cpp index 139736459..271344fe8 100644 --- a/libs/intrusive/test/unordered_set_test.cpp +++ b/libs/intrusive/test/unordered_set_test.cpp @@ -10,7 +10,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include <boost/intrusive/detail/config_begin.hpp> #include <boost/intrusive/unordered_set.hpp> #include <boost/intrusive/pointer_traits.hpp> #include "itestvalue.hpp" @@ -632,8 +631,7 @@ class test_main_template , incremental >::test_all(data); test_unordered_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -678,8 +676,7 @@ class test_main_template<VoidPointer, false, incremental> >::test_all(data); test_unordered_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::member_hook_type , &value_type::node_ > @@ -699,8 +696,7 @@ class test_main_template<VoidPointer, false, incremental> >::test_all(data); test_unordered_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks<VoidPointer>::auto_member_hook_type , &value_type::auto_node_ > @@ -725,4 +721,3 @@ int main() test_main_template<smart_ptr<void>, true, false>()(); return boost::report_errors(); } -#include <boost/intrusive/detail/config_end.hpp> |