forked from boostorg/intrusive
* Big refactoring in order to reduce template and debug symbol bloat.
* Fixes #8698 * Implemented SCARY iterators [SVN r85165]
This commit is contained in:
1 parent
83f5f4b95b
commit
fbd8e26461
146 files changed
+12087
-22796
No files matched your search
+29
-21
@@ -13,6 +13,8 @@ import doxygen ;
|
||||
import quickbook ;
|
||||
path-constant here : . ;
|
||||
|
||||
|
||||
|
||||
doxygen autodoc
|
||||
:
|
||||
[ glob ../../../boost/intrusive/*.hpp ]
|
||||
@@ -23,27 +25,33 @@ doxygen autodoc
|
||||
<doxygen:param>EXTRACT_PRIVATE=NO
|
||||
<doxygen:param>ENABLE_PREPROCESSING=YES
|
||||
<doxygen:param>MACRO_EXPANSION=YES
|
||||
<doxygen:param>"PREDEFINED=BOOST_INTRUSIVE_DOXYGEN_INVOKED \\
|
||||
"list_impl=list" \\
|
||||
"slist_impl=slist" \\
|
||||
"set_impl=set" \\
|
||||
"multiset_impl=multiset" \\
|
||||
"rbtree_impl=rbtree" \\
|
||||
"unordered_set_impl=unordered_set" \\
|
||||
"unordered_multiset_impl=unordered_multiset" \\
|
||||
"hashtable_impl=hashtable" \\
|
||||
"splay_set_impl=splay_set" \\
|
||||
"splay_multiset_impl=splay_multiset" \\
|
||||
"splaytree_impl=splaytree" \\
|
||||
"sg_set_impl=sg_set" \\
|
||||
"sg_multiset_impl=sg_multiset" \\
|
||||
"sgtree_impl=sgtree" \\
|
||||
"avl_set_impl=avl_set" \\
|
||||
"avl_multiset_impl=avl_multiset" \\
|
||||
"avltree_impl=avltree" \\
|
||||
"treap_set_impl=treap_set" \\
|
||||
"treap_multiset_impl=treap_multiset" \\
|
||||
"treap_impl=treap""
|
||||
<doxygen:param>"PREDEFINED=\"BOOST_INTRUSIVE_DOXYGEN_INVOKED\" \\
|
||||
\"BOOST_INTRUSIVE_IMPDEF(T)=implementation_defined\" \\
|
||||
\"BOOST_INTRUSIVE_SEEDOC(T)=see_documentation\" \\
|
||||
\"BOOST_RV_REF(T)=T &&\" \\
|
||||
\"BOOST_RV_REF_BEG=\" \\
|
||||
\"BOOST_RV_REF_END=&&\" \\
|
||||
\"list_impl=list\" \\
|
||||
\"slist_impl=slist\" \\
|
||||
\"set_impl=set\" \\
|
||||
\"multiset_impl=multiset\" \\
|
||||
\"bstree_impl=bstree\" \\
|
||||
\"rbtree_impl=rbtree\" \\
|
||||
\"unordered_set_impl=unordered_set\" \\
|
||||
\"unordered_multiset_impl=unordered_multiset\" \\
|
||||
\"hashtable_impl=hashtable\" \\
|
||||
\"splay_set_impl=splay_set\" \\
|
||||
\"splay_multiset_impl=splay_multiset\" \\
|
||||
\"splaytree_impl=splaytree\" \\
|
||||
\"sg_set_impl=sg_set\" \\
|
||||
\"sg_multiset_impl=sg_multiset\" \\
|
||||
\"sgtree_impl=sgtree\" \\
|
||||
\"avl_set_impl=avl_set\" \\
|
||||
\"avl_multiset_impl=avl_multiset\" \\
|
||||
\"avltree_impl=avltree\" \\
|
||||
\"treap_set_impl=treap_set\" \\
|
||||
\"treap_multiset_impl=treap_multiset\" \\
|
||||
\"treap_impl=treap\""
|
||||
;
|
||||
|
||||
xml intrusive : intrusive.qbk
|
||||
|
||||
+59
-3
@@ -1,5 +1,5 @@
|
||||
[/
|
||||
/ Copyright (c) 2006-2012 Ion Gaztanaga
|
||||
/ Copyright (c) 2006-2013 Ion Gaztanaga
|
||||
/
|
||||
/ 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)
|
||||
@@ -8,7 +8,7 @@
|
||||
[library Boost.Intrusive
|
||||
[quickbook 1.5]
|
||||
[authors [Krzikalla, Olaf], [Gaztanaga, Ion]]
|
||||
[copyright 2005 Olaf Krzikalla, 2006-2012 Ion Gaztanaga]
|
||||
[copyright 2005 Olaf Krzikalla, 2006-2013 Ion Gaztanaga]
|
||||
[id intrusive]
|
||||
[dirname intrusive]
|
||||
[purpose Intrusive containers]
|
||||
@@ -434,6 +434,14 @@ Now we can use the container:
|
||||
|
||||
[endsect]
|
||||
|
||||
However, member hooks have some implementation limitations: If there is a virtual inheritance
|
||||
relationship between the parent and the member hook, then the distance between the parent
|
||||
and the hook is not a compile-time fixed value so obtaining the address of
|
||||
the parent from the member hook is not possible without reverse engineering compiler
|
||||
produced RTTI. Apart from this, the non-standard pointer to member implementation for classes
|
||||
with complex inheritance relationships in MSVC ABI compatible-compilers is not supported
|
||||
by member hooks since it also depends on compiler-produced RTTI information.
|
||||
|
||||
[section:usage_both_hooks Using both hooks]
|
||||
|
||||
You can insert the same object in several intrusive containers at the same time,
|
||||
@@ -3357,6 +3365,36 @@ To analyze the thread safety, consider the following points:
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:scary_iterators Scary Iterators]
|
||||
|
||||
The paper N2913, titled [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2913.pdf,
|
||||
SCARY Iterator Assignment and Initialization], proposed a requirement that a standard container’s
|
||||
iterator types have no dependency on any type argument apart from the container’s `value_type`,
|
||||
`difference_type`, `pointer type`, and `const_pointer` type. In particular, according to the proposal,
|
||||
the types of a standard container’s iterators should not depend on the container’s `key_compare`,
|
||||
`hasher`, `key_equal`, or `allocator` types.
|
||||
|
||||
That paper demonstrated that SCARY operations were crucial to the performant implementation of common
|
||||
design patterns using STL components. It showed that implementations that support SCARY operations reduce
|
||||
object code bloat by eliminating redundant specializations of iterator and algorithm templates.
|
||||
|
||||
[*Boost.Intrusive] containers are a bit different from standard containers. In particular, they have no
|
||||
allocator parameter and they can be configured with additional options not present in STL-like containers.
|
||||
Thus [*Boost.Intrusive] offers its own `SCARY iterator` implementation, where iterator types don't
|
||||
change when the container is configured with an option that does not alter the value <-> node transformation.
|
||||
More concretely, the following options and conditions guarantee that iterator types are unchanged:
|
||||
|
||||
* [*All containers]: `size_type<>`, `constant_time_size<>`,
|
||||
* [*`slist`]: `cache_last<>`, `linear<>`,
|
||||
* [*`unordered_[multi]set`]: `hash<>`, `equal<>`, `power_2_buckets<>`, `cache_begin<>`.
|
||||
* [*All tree-like containers] (`[multi]set`, `avl_[multi]set`, `sg_[multi]set`, `bs_[multi]set`,
|
||||
`splay_[multi]set`, `treap_[multi]set`): `compare<>`.
|
||||
* [*`treap_[multi]set`]: `priority<>`
|
||||
* [*`bs_[multi]set`, `sg_[multi]set`, `treap_[multi]set`, `splay_[multi]set`]:
|
||||
They share the same iterator type when configured with the same options.
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:equal_range_stability Stability and insertion with hint in ordered associative containers with equivalent keys]
|
||||
|
||||
[*Boost.Intrusive] ordered associative containers with equivalent keys offer stability guarantees, following
|
||||
@@ -3846,6 +3884,24 @@ to be inserted in intrusive containers are allocated using `std::vector` or `std
|
||||
|
||||
[section:release_notes Release Notes]
|
||||
|
||||
[section:release_notes_boost_1_55_00 Boost 1.55 Release]
|
||||
|
||||
* [*Source breaking]: Deprecated `xxx_dont_splay` functions from splay containers.
|
||||
Deprecated `splay_set_hook` from splay containers, use `bs_set_hook` instead.
|
||||
Both will be removed in Boost 1.56.
|
||||
|
||||
* [*ABI breaking]: Hash containers' end iterator was implemented pointing to one-past the end of the bucket array
|
||||
(see [@https://svn.boost.org/trac/boost/ticket/8698 #8698]) causing severe bugs when values to be inserted
|
||||
where allocated next to the bucket array. End iterator implementation was changed to point to the beginning
|
||||
of the bucket array.
|
||||
|
||||
* Big refactoring in order to reduce template and debug symbol bloat. Test object files have been slashed
|
||||
to half in MSVC compilers in Debug mode. Toolchains without Identical COMDAT Folding (ICF) should notice size improvements.
|
||||
|
||||
* Implemented [link intrusive.scary_iterators SCARY iterators].
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:release_notes_boost_1_54_00 Boost 1.54 Release]
|
||||
|
||||
* Added `BOOST_NO_EXCEPTIONS` support (bug [@https://svn.boost.org/trac/boost/ticket/7849 #7849]).
|
||||
@@ -3932,7 +3988,7 @@ to be inserted in intrusive containers are allocated using `std::vector` or `std
|
||||
|
||||
[section:release_notes_boost_1_40_00 Boost 1.40 Release]
|
||||
|
||||
* Code cleanup in tree_algorithms.hpp and avl_tree_algorithms.hpp
|
||||
* Code cleanup in bstree_algorithms.hpp and avl_tree_algorithms.hpp
|
||||
* Fixed bug
|
||||
[@https://svn.boost.org/trac/boost/ticket/3164 #3164].
|
||||
|
||||
|
||||
Reference in new issue
Block a user