• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1[/
2 / Copyright (c) 2009-2018 Ion Gazta\u00F1aga
3 /
4 / Distributed under the Boost Software License, Version 1.0. (See accompanying
5 / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 /]
7
8[library Boost.Container
9    [quickbook 1.5]
10    [authors [Gaztanaga, Ion]]
11    [copyright 2009-2018 Ion Gaztanaga]
12    [id container]
13    [dirname container]
14    [purpose Containers library]
15    [license
16        Distributed under the Boost Software License, Version 1.0.
17        (See accompanying file LICENSE_1_0.txt or copy at
18        [@http://www.boost.org/LICENSE_1_0.txt])
19    ]
20]
21
22[template super[x]'''<superscript>'''[x]'''</superscript>''']
23[template sub[x]'''<subscript>'''[x]'''</subscript>''']
24
25[section:intro Introduction]
26
27[*Boost.Container] library implements several well-known containers, including
28STL containers. The aim of the library is to offer advanced features not present
29in standard containers or to offer the latest standard draft features for compilers
30that don't comply with the latest C++ standard.
31
32In short, what does [*Boost.Container] offer?
33
34* Emplacement and move semantics are implemented, including emulation for pre-C++11 compilers.
35* Polymorphic allocators and memory resources, including implementation and emulation for pre-C++17 compilers
36* New advanced features (e.g. recursive containers) and configurability options [link container.configurable_containers] for containers.
37* Containers support stateful allocators and are compatible with [*Boost.Interprocess]
38  (they can be safely placed in shared memory).
39* Users obtain a more uniform performance across all plataforms,
40  including [link container.main_features.scary_iterators SCARY iterators].
41* The library offers new useful containers:
42  * [classref boost::container::flat_map flat_map],
43    [classref boost::container::flat_set flat_set],
44    [classref boost::container::flat_multimap flat_multimap] and
45    [classref boost::container::flat_multiset flat_multiset]: drop-in
46    replacements for standard associative containers but more memory friendly and with faster
47    searches.
48  * [classref boost::container::stable_vector stable_vector]: a std::list and std::vector hybrid
49    container: vector-like random-access iterators and list-like iterator stability in insertions and erasures.
50  * [classref boost::container::static_vector static_vector ]: a vector-like container that internally embeds
51    (statically allocates) all needed memory up to the maximum capacity. Maximum capacity can't be increased and
52    it's specified at compile time.
53  * [classref boost::container::small_vector small_vector ]: a vector-like container that internally embeds
54    (statically allocates) a minimum amount of memory, but dynamically allocates elements when capacity
55    has to be increased. This minimum capacity is specified at compile time.
56  * [classref boost::container::slist slist]: the classic pre-standard singly linked list implementation
57    offering constant-time `size()`. Note that C++11 `forward_list` has no `size()`.
58
59[section:introduction_building_container Building Boost.Container]
60
61There is no need to compile [*Boost.Container], since it's a header-only library,
62just include your Boost header directory in your compiler include path *except if you use*:
63
64*  [link container.extended_allocators Extended Allocators]
65*  Some [link container.cpp_conformance.polymorphic_memory_resources Polymorphic Memory Resources] classes.
66
67Those exceptions are are implemented as a separately compiled library, so in those cases you must install binaries
68in a location that can be found by your linker.
69If you followed the [@http://www.boost.org/doc/libs/release/more/getting_started/index.html Boost Getting Started]
70instructions, that's already been done for you.
71
72[endsect]
73
74[section:tested_compilers Tested compilers]
75
76[*Boost.Container] requires a decent C++03 compatibility. Some compilers known to work are:
77
78*  Visual C++ >= 10.0
79*  GCC >= 4.8
80
81[endsect]
82
83[endsect]
84
85[section:main_features Main features]
86
87[section:move_emplace Efficient insertion]
88
89Move semantics and placement insertion are two features brought by C++11 containers
90that can have a very positive impact in your C++ applications. Boost.Container implements
91both techniques both for C++11 and C++03 compilers.
92
93[section:move_containers Move-aware containers]
94
95All containers offered by [*Boost.Container] can store movable-only types
96and actual requirements for `value_type` depend on each container operations.
97Following C++11 requirements even for C++03 compilers, many operations now require
98movable or default constructible types instead of just copy constructible types.
99
100Containers themselves are also movable, with no-throw guarantee if allocator
101or predicate (if present) copy operations are no-throw. This allows
102high performance operations when transferring data between vectors.
103Let's see an example:
104
105[import ../example/doc_move_containers.cpp]
106[doc_move_containers]
107
108[endsect]
109
110[section:emplace Emplace: Placement insertion]
111
112All containers offered by [*Boost.Container] implement placement insertion,
113which means that  objects can be built directly into the container from user arguments
114without creating any temporary object. For compilers without variadic templates support
115placement insertion is emulated up to a finite (10) number of arguments.
116
117Expensive to move types are perfect candidates emplace functions and in case of node containers
118([classref boost::container::list list], [classref boost::container::set set], ...)
119emplace allows storing non-movable and non-copyable types in containers! Let's
120see an example:
121
122[import ../example/doc_emplace.cpp]
123[doc_emplace]
124
125[endsect]
126
127[endsect]
128
129
130[section:containers_of_incomplete_types Containers of Incomplete Types]
131
132Incomplete types allow
133[@http://en.wikipedia.org/wiki/Type_erasure [*type erasure ]] and
134[@http://en.wikipedia.org/wiki/Recursive_data_type [*recursive data types]], and
135C and C++ programmers have been using it for years to build complex data structures, like
136tree structures where a node may have an arbitrary number of children.
137
138What about standard containers? Containers of incomplete types have been under discussion for a long time,
139as explained in Matt Austern's great article ([@http://drdobbs.com/184403814 [*The Standard Librarian: Containers of Incomplete Types]]):
140
141["['Unlike most of my columns, this one is about something you can't do with the C++ Standard library:
142put incomplete types in one of the standard containers. This column explains why you might want to
143do this, why the standardization committee banned it even though they knew it was useful, and what
144you might be able to do to get around the restriction.]]
145
146["['In 1997, shortly before the C++ Standard was completed, the standardization committee received a
147query: Is it possible to create standard containers with incomplete types? It took a while for the
148committee to understand the question. What would such a thing even mean, and why on earth would you
149ever want to do it? The committee eventually worked it out and came up with an answer to the question.
150(Just so you don't have to skip ahead to the end, the answer is "no.") But the question is much more
151interesting than the answer: it points to a useful, and insufficiently discussed, programming technique.
152The standard library doesn't directly support that technique, but the two can be made to coexist.]]
153
154["['In a future revision of C++, it might make sense to relax the restriction on instantiating
155standard library templates with incomplete types. Clearly, the general prohibition should stay
156in place - instantiating templates with incomplete types is a delicate business, and there are
157too many classes in the standard library where it would make no sense. But perhaps it should be
158relaxed on a case-by-case basis, and `vector` looks like a good candidate for such special-case
159treatment: it's the one standard container class where there are good reasons to instantiate
160it with an incomplete type and where Standard Library implementors want to make it work. As of
161today, in fact, implementors would have to go out of their way to prohibit it!]]
162
163C++11 standard is also cautious about incomplete types and STL: ["['17.6.4.8 Other functions (...) 2.
164the effects are undefined in the following cases: (...) In particular - if an incomplete type (3.9)
165is used as a template argument when instantiating a template component,
166unless specifically allowed for that component]].
167
168Finally C++17 added support for incomplete types in `std::vector`, `std::list` and `std::forward_list`
169(see [@https://wg21.link/n4510 ['N4510: Minimal incomplete type support for standard containers, revision 4]]
170for details), but no other containers like `std::set/map/unordered_set/unordered_map`,
171
172Fortunately all [*Boost.Container] containers except
173[classref boost::container::static_vector static_vector] and
174[classref boost::container::small_vector small_vector] and
175[classref boost::container::basic_string basic_string] are designed to support incomplete types.
176[classref boost::container::static_vector static_vector] and
177[classref boost::container::small_vector small_vector] are special because
178they statically allocates memory for `value_type` and this requires complete types.
179[classref boost::container::basic_string basic_string] implements Small String Optimization which
180also requires complete types.
181
182[*Boost.Container] containers supporting incomplete types also support instantiating iterators to
183those incomplete elements.
184
185[section:recursive_containers Recursive containers]
186
187Most [*Boost.Container] containers can be used to define recursive containers:
188
189[import ../example/doc_recursive_containers.cpp]
190[doc_recursive_containers]
191
192[endsect]
193
194[section:type_erasure Type Erasure]
195
196Containers of incomplete types are useful to break header file dependencies and improve
197compilation types. With Boost.Container, you can write a header file defining a class
198with containers of incomplete types as data members, if you carefully put all the
199implementation details that require knowing the size of the `value_type` in your
200implementation file:
201
202[import ../example/doc_type_erasure.cpp]
203
204In this header file we define a class (`MyClassHolder)` that holds a `vector` of an
205incomplete type (`MyClass`) that it's only forward declared.
206
207[doc_type_erasure_MyClassHolder_h]
208
209Then we can define `MyClass` in its own header file.
210
211[doc_type_erasure_MyClass_h]
212
213And include it only in the implementation file of `MyClassHolder`
214
215[doc_type_erasure_MyClassHolder_cpp]
216
217Finally, we can just compile, link, and run!
218
219[doc_type_erasure_main_cpp]
220
221[endsect]
222
223[endsect]
224
225[section:scary_iterators SCARY iterators]
226
227The paper N2913, titled [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2913.pdf
228SCARY Iterator Assignment and Initialization], proposed a requirement that a standard container's
229iterator types have no dependency on any type argument apart from the container's `value_type`,
230`difference_type`, `pointer type`, and `const_pointer` type. In particular, according to the proposal,
231the types of a standard container's iterators should not depend on the container's `key_compare`,
232`hasher`, `key_equal`, or `allocator` types.
233
234That paper demonstrated that SCARY operations were crucial to the performant implementation of common
235design patterns using STL components. It showed that implementations that support SCARY operations reduce
236object code bloat by eliminating redundant specializations of iterator and algorithm templates.
237
238[*Boost.Container] containers implement SCARY iterators so the iterator type of a container is only dependent
239on the `allocator_traits<allocator_type>::pointer` type (the pointer type of the `value_type` to be inserted
240in the container). Reference types and all other typedefs are deduced from the pointer type using the
241C++11 `pointer_traits` utility. This leads to lower code bloat in algorithms and classes templated on
242iterators.
243
244[endsect]
245
246[section:other_features Other features]
247
248* Default constructors don't allocate memory which improves performance and
249  usually implies a no-throw guarantee (if predicate's or allocator's default constructor doesn't throw).
250
251* Small string optimization for [classref boost::container::basic_string basic_string],
252  with an internal buffer of 11/23 bytes (32/64 bit systems)
253  [*without] increasing the usual `sizeof` of the string (3 words).
254
255* `[multi]set/map` containers are size optimized embedding the color bit of the red-black tree nodes
256   in the parent pointer.
257
258* `[multi]set/map` containers use no recursive functions so stack problems are avoided.
259
260[endsect]
261
262[endsect]
263
264[section:exception_handling Boost.Container and C++ exceptions]
265
266In some environments, such as game development or embedded systems, C++ exceptions are disabled or a customized error handling is needed.
267According to document [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2271.html N2271 EASTL -- Electronic Arts Standard Template Library]
268exceptions can be disabled for several reasons:
269
270*  ["['Exception handling incurs some kind of cost in all compiler implementations, including those that avoid
271   the cost during normal execution. However, in some cases this cost may arguably offset the cost of the code that it is replacing.]]
272*  ["['Exception handling is often agreed to be a superior solution for handling a large range of function return values. However,
273   avoiding the creation of functions that need large ranges of return values is superior to using exception handling to handle such values.]]
274*  ["['Using exception handling correctly can be difficult in the case of complex software.]]
275*  ["['The execution of throw and catch can be significantly expensive with some implementations.]]
276*  ["['Exception handling violates the don't-pay-for-what-you-don't-use design of C++, as it incurs overhead in any non-leaf function that
277   has destructible stack objects regardless of whether they use exception handling.]]
278*  ["['The approach that game software usually takes is to avoid the need for exception handling where possible; avoid the possibility
279   of circumstances that may lead to exceptions. For example, verify up front that there is enough memory for a subsystem to do its job
280   instead of trying to deal with the problem via exception handling or any other means after it occurs.]]
281*  ["['However, some game libraries may nevertheless benefit from the use of exception handling. It's best, however,
282   if such libraries keep the exception handling internal lest they force their usage of exception handling on the rest of the application.]]
283
284In order to support environments without C++ exception support or environments with special error handling needs,
285[*Boost.Container] changes error signalling behaviour when `BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS` or `BOOST_NO_EXCEPTIONS`
286is defined. The former shall be defined by the user and the latter can be either defined by the user or implicitly defined by [*Boost.Confg]
287when the compiler has been invoked with the appropriate flag (like `-fno-exceptions` in GCC).
288
289When dealing with user-defined classes, (e.g. when constructing user-defined classes):
290
291*  If `BOOST_NO_EXCEPTIONS` is defined, the library avoids using `try`/`catch`/`throw` statements. The class writer must handle and
292   propagate error situations internally as no error will be propagated through [*Boost.Container].
293*  If `BOOST_NO_EXCEPTIONS` is *not* defined, the library propagates exceptions offering the exception guarantees detailed in the documentation.
294
295When the library needs to throw an exception (such as `out_of_range` when an incorrect index is used in `vector::at`), the library calls
296a throw-callback declared in [headerref boost/container/throw_exception.hpp]:
297
298*  If `BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS` is defined, then the programmer must provide its own definition for all
299   `throw_xxx` functions. Those functions can't return, they must throw an exception or call `std::exit` or `std::abort`.
300*  Else if `BOOST_NO_EXCEPTIONS` is defined, a `BOOST_ASSERT_MSG` assertion is triggered
301   (see [@http://www.boost.org/libs/utility/assert.html Boost.Assert] for more information).
302   If this assertion returns, then `std::abort` is called.
303*  Else, an appropriate standard library exception is thrown (like `std::out_of_range`).
304
305[endsect]
306
307[section:non_standard_containers Non-standard containers]
308
309[section:stable_vector ['stable_vector]]
310
311This useful, fully STL-compliant stable container [@http://bannalia.blogspot.com/2008/09/introducing-stablevector.html designed by Joaqu\u00EDn M. L\u00F3pez Mu\u00F1oz]
312is an hybrid between `vector` and `list`, providing most of
313the features of `vector` except [@http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#69 element contiguity].
314
315Extremely convenient as they are, `vector`s have a limitation that many novice C++ programmers frequently stumble upon:
316iterators and references to an element of an `vector` are invalidated when a preceding element is erased or when the
317vector expands and needs to migrate its internal storage to a wider memory region (i.e. when the required size exceeds
318the vector's capacity). We say then that `vector`s are unstable: by contrast, stable containers are those for which
319references and iterators to a given element remain valid as long as the element is not erased: examples of stable containers
320within the C++ standard library are `list` and the standard associative containers (`set`, `map`, etc.).
321
322Sometimes stability is too precious a feature to live without, but one particular property of `vector`s, element contiguity,
323makes it impossible to add stability to this container. So, provided we sacrifice element contiguity, how much
324can a stable design approach the behavior of `vector` (random access iterators, amortized constant time end
325insertion/deletion, minimal memory overhead, etc.)?
326The following image describes the layout of a possible data structure upon which to base the design of a stable vector:
327
328[$../../libs/container/doc/images/stable_vector.png  [width 50%] [align center] ]
329
330Each element is stored in its own separate node. All the nodes are referenced from a contiguous array of pointers, but
331also every node contains an "up" pointer referring back to the associated array cell. This up pointer is the key element
332to implementing stability and random accessibility:
333
334Iterators point to the nodes rather than to the pointer array. This ensures stability, as it is only the pointer array
335that needs to be shifted or relocated upon insertion or deletion. Random access operations can be implemented by using
336the pointer array as a convenient intermediate zone. For instance, if the iterator it holds a node pointer `it.p` and we
337want to advance it by n positions, we simply do:
338
339[c++]
340
341   it.p = *(it.p->up+n);
342
343That is, we go "up" to the pointer array, add n there and then go "down" to the resulting node.
344
345[*General properties]. `stable_vector` satisfies all the requirements of a container, a reversible container and a sequence
346and provides all the optional operations present in vector. Like vector, iterators are random access. `stable_vector`
347does not provide element contiguity; in exchange for this absence, the container is stable, i.e. references and iterators
348to an element of a `stable_vector` remain valid as long as the element is not erased, and an iterator that has been
349assigned the return value of end() always remain valid until the destruction of the associated `stable_vector`.
350
351[*Operation complexity]. The big-O complexities of `stable_vector` operations match exactly those of vector. In general,
352insertion/deletion is constant time at the end of the sequence and linear elsewhere. Unlike vector, `stable_vector`
353does not internally perform any value_type destruction, copy/move construction/assignment operations other than those exactly
354corresponding to the insertion of new elements or deletion of stored elements, which can sometimes compensate in terms of
355performance for the extra burden of doing more pointer manipulation and an additional allocation per element.
356
357[*Exception safety]. (according to [@http://www.boost.org/community/exception_safety.html Abrahams' terminology])
358As `stable_vector` does not internally copy/move elements around, some
359operations provide stronger exception safety guarantees than in vector:
360
361[table:stable_vector_req Exception safety
362    [[operation] [exception safety for `vector<T>`] [exception safety for `stable_vector<T>`]]
363    [[insert]    [strong unless copy/move construction/assignment of `T` throw (basic)]     [strong]]
364    [[erase]     [no-throw unless copy/move construction/assignment  of `T` throw (basic)]     [no-throw]]
365]
366
367[*Memory overhead]. The C++ standard does not specify requirements on memory consumption, but virtually any implementation
368of `vector` has the same behavior with respect to memory usage: the memory allocated by a `vector` v with n elements of type T
369is
370
371m[sub v] = c\u2219e,
372
373where c is `v.capacity()` and e is `sizeof(T)`. c can be as low as n if the user has explicitly reserved the exact capacity
374required; otherwise, the average value c for a growing `vector` oscillates between 1.25\u2219n and 1.5\u2219n for typical resizing
375policies. For `stable_vector`, the memory usage is
376
377m[sub sv] = (c + 1)p + (n + 1)(e + p),
378
379where p is the size of a pointer. We have c + 1 and n + 1 rather than c and n because a dummy node is needed at the end of
380the sequence. If we call f the capacity to size ratio c/n and assume that n is large enough, we have that
381
382m[sub sv]/m[sub v] \u2243 (fp + e + p)/fe.
383
384So, `stable_vector` uses less memory than `vector` only when e > p and the capacity to size ratio exceeds a given threshold:
385
386m[sub sv] < m[sub v] <-> f > (e + p)/(e - p). (provided e > p)
387
388This threshold approaches typical values of f below 1.5 when e > 5p; in a 32-bit architecture, when e > 20 bytes.
389
390[*Summary]. `stable_vector` is a drop-in replacement for `vector` providing stability of references and iterators, in exchange
391for missing element contiguity and also some performance and memory overhead. When the element objects are expensive to
392move around, the performance overhead can turn into a net performance gain for `stable_vector` if many middle insertions
393or deletions are performed or if resizing is very frequent. Similarly, if the elements are large there are situations when
394the memory used by `stable_vector` can actually be less than required by vector.
395
396['Note: Text and explanations taken from [@http://bannalia.blogspot.com/2008/09/introducing-stablevector.html Joaqu\u00EDn's blog]]
397
398[endsect]
399
400[section:flat_xxx ['flat_(multi)map/set] associative containers]
401
402Using sorted vectors instead of tree-based associative containers is a well-known technique in
403C++ world. Matt Austern's  classic article
404[@http://lafstern.org/matt/col1.pdf Why You Shouldn't Use set, and What You Should Use Instead]
405(C++ Report 12:4, April 2000) was enlightening:
406
407["['Red-black trees aren't the only way to organize data that permits lookup in logarithmic time.  One of the basic
408algorithms of computer science is binary search, which works by successively dividing a range in half. Binary
409search is log N and it doesn't require any fancy data structures, just a sorted collection of elements.
410(...) You can use whatever data structure is convenient, so long as it provides STL iterator;
411usually it's easiest to use a C array, or a vector.]]
412
413["['Both std::lower_bound and set::find take time proportional to log N, but the constants of proportionality
414are very different.  Using g++ (...) it takes X seconds to perform a million lookups in a
415sorted vector<double> of a million elements, and almost twice as long (...) using a set. Moreover,
416the set uses almost three times as much memory (48 million bytes) as the vector (16.8 million).]]
417
418["['Using a sorted vector instead of a set gives you faster lookup and much faster iteration,
419but at the cost of slower insertion.  Insertion into a set, using set::insert, is proportional
420to log N, but insertion into a sorted vector, (...)
421, is proportional to N. Whenever you insert something into a vector,
422vector::insert has to make room by shifting all of the elements that follow it.  On average, if you're equally
423likely to insert a new element anywhere, you'll be shifting N/2 elements.]]
424
425["['It may sometimes be convenient to bundle all of this together into a small container adaptor.
426This class does not satisfy the requirements of a Standard Associative Container, since the complexity of insert is
427O(N) rather than O(log N), but otherwise it is almost a drop-in replacement for set.]]
428
429Following Matt Austern's indications, Andrei Alexandrescu's
430[@http://www.bestwebbuys.com/Modern-C-Design-Generic-Programming-and-Design-Patterns-Applied-ISBN-9780201704310?isrc=-rd Modern C++ Design]
431showed `AssocVector`, a `std::map` drop-in
432replacement designed in his [@http://loki-lib.sourceforge.net/ Loki] library:
433
434["['It seems as if we're better off with a sorted vector. The disadvantages of a sorted
435vector are linear-time insertions and linear-time deletions (...). In exchange, a vector
436offers about twice the lookup speed and a much smaller working set (...).
437Loki saves the trouble of maintaining a sorted vector by hand by defining an AssocVector class
438template. AssocVector is a drop-in replacement for std::map (it supports the same set of member
439functions), implemented on top of std::vector. AssocVector differs from a map in the behavior of
440its erase functions (AssocVector::erase invalidates all iterators into the object) and in the
441complexity guarantees of insert and erase (linear as opposed to constant). ]]
442
443[*Boost.Container] `flat_[multi]map/set` containers are ordered, vector-like container based, associative
444containers following  Austern's and Alexandrescu's guidelines. These ordered vector containers have also
445benefited with the addition of `move semantics` to C++11, speeding up insertion and
446erasure times considerably. Flat associative containers have the following attributes:
447
448* Faster lookup than standard associative containers
449* Much faster iteration than standard associative containers.
450   Random-access iterators instead of bidirectional iterators.
451* Less memory consumption for small objects (and for big objects if `shrink_to_fit` is used)
452* Improved cache performance (data is stored in contiguous memory)
453* Non-stable iterators (iterators are invalidated when inserting and erasing elements)
454* Non-copyable and non-movable values types can't be stored
455* Weaker exception safety than standard associative containers
456(copy/move constructors can throw when shifting values in erasures and insertions)
457* Slower insertion and erasure than standard associative containers (specially for non-movable types)
458
459[endsect]
460
461[section:slist ['slist]]
462
463When the standard template library was designed, it contained a singly linked list called `slist`.
464Unfortunately, this container was not standardized and remained as an extension for many standard
465library implementations until C++11 introduced `forward_list`, which is a bit different from the
466the original SGI `slist`. According to [@http://www.sgi.com/tech/stl/Slist.html SGI STL documentation]:
467
468["['An `slist` is a singly linked list: a list where each element is linked to the next element, but
469not to the previous element. That is, it is a Sequence that supports forward but not backward traversal,
470and (amortized) constant time insertion and removal of elements. Slists, like lists, have the important
471property that insertion and splicing do not invalidate iterators to list elements, and that even removal
472invalidates only the iterators that point to the elements that are removed. The ordering of iterators
473may be changed (that is, slist<T>::iterator might have a different predecessor or successor after a list
474operation than it did before), but the iterators themselves will not be invalidated or made to point to
475different elements unless that invalidation or mutation is explicit.]]
476
477["['The main difference between `slist` and list is that list's iterators are bidirectional iterators,
478while slist's iterators are forward iterators. This means that `slist` is less versatile than list;
479frequently, however, bidirectional iterators are unnecessary. You should usually use `slist` unless
480you actually need the extra functionality of list, because singly linked lists are smaller and faster
481than double linked lists.]]
482
483["['Important performance note: like every other Sequence, `slist` defines the member functions insert and erase.
484Using these member functions carelessly, however, can result in disastrously slow programs. The problem is that
485insert's first argument is an iterator pos, and that it inserts the new element(s) before pos. This means that
486insert must find the iterator just before pos; this is a constant-time operation for list, since list has
487bidirectional iterators, but for `slist` it must find that iterator by traversing the list from the beginning
488up to pos. In other words: insert and erase are slow operations anywhere but near the beginning of the slist.]]
489
490["['Slist provides the member functions insert_after and erase_after, which are constant time operations: you should
491always use insert_after and erase_after whenever possible. If you find that insert_after and erase_after aren't
492adequate for your needs, and that you often need to use insert and erase in the middle of the list, then you
493should probably use list instead of slist.]]
494
495[*Boost.Container] updates the classic `slist` container with C++11 features like move semantics and placement
496insertion and implements it a bit differently than the standard C++ `forward_list`. `forward_list` has no `size()`
497method, so it's been designed to allow (or in practice, encourage) implementations without tracking list size
498with every insertion/erasure, allowing constant-time
499`splice_after(iterator, forward_list &, iterator, iterator)`-based list merging. On the other hand `slist` offers
500constant-time `size()` for those that don't care about linear-time `splice_after(iterator, slist &, iterator, iterator)`
501`size()` and offers an additional `splice_after(iterator, slist &, iterator, iterator, size_type)` method that
502can speed up `slist` merging when the programmer already knows the size. `slist` and `forward_list` are therefore
503complementary.
504
505[endsect]
506
507[section:static_vector ['static_vector]]
508
509`static_vector` is an hybrid between `vector` and `array`: like `vector`, it's a sequence container
510with contiguous storage that can change in size, along with the static allocation, low overhead,
511and fixed capacity of `array`. `static_vector` is based on Adam Wulkiewicz and Andrew Hundt's
512high-performance [@https://svn.boost.org/svn/boost/sandbox/varray/doc/html/index.html varray]
513class.
514
515The number of elements in a `static_vector` may vary dynamically up to a fixed capacity
516because elements are stored within the object itself similarly to an array. However, objects are
517initialized as they are inserted into `static_vector` unlike C arrays or `std::array` which must construct
518all elements on instantiation. The behavior of `static_vector` enables the use of statically allocated
519elements in cases with complex object lifetime requirements that would otherwise not be trivially
520possible. Some other properties:
521
522* Random access to elements
523* Constant time insertion and removal of elements at the end
524* Linear time insertion and removal of elements at the beginning or in the middle.
525
526`static_vector` is well suited for use in a buffer, the internal implementation of other
527classes, or use cases where there is a fixed limit to the number of elements that must be stored.
528Embedded and realtime applications where allocation either may not be available or acceptable
529are a particular case where `static_vector` can be beneficial.
530
531[endsect]
532
533[section:small_vector ['small_vector]]
534
535`small_vector` is a vector-like container optimized for the case when it contains few elements.
536It contains some preallocated elements in-place, which allows it to avoid the use of dynamic storage allocation
537when the actual number of elements is below that preallocated threshold. `small_vector` is inspired by
538[@http://llvm.org/docs/ProgrammersManual.html#llvm-adt-smallvector-h LLVM's `SmallVector`] container.
539Unlike `static_vector`, `small_vector`'s capacity can grow beyond the initial preallocated capacity.
540
541`small_vector<T, N, Allocator>` is convertible to `small_vector_base<T, Allocator>`, a type that is independent
542from the preallocated element count, allowing client code that does not need to be templated on that N argument.
543`small_vector` inherits all `vector`'s member functions so it supports all standard features like emplacement,
544stateful allocators, etc.
545
546[endsect]
547
548[endsect]
549
550[section:extended_functionality Extended functionality: Basic extensions]
551
552[section:default_initialialization Default initialization for vector-like containers]
553
554STL and most other containers value initialize new elements in common operations like
555`vector::resize(size_type n)` or `explicit vector::vector(size_type n)`.
556
557In some performance-sensitive environments, where vectors are used as a replacement for
558variable-size buffers for file or network operations,
559[@http://en.cppreference.com/w/cpp/language/value_initialization value initialization]
560is a cost that is not negligible as elements are going to be overwritten by an external source
561shortly after new elements are added to the container.
562
563[*Boost.Container] offers two new members for `vector`, `static_vector` and `stable_vector`:
564`explicit container::container(size_type n, default_init_t)` and
565`container::resize(size_type n, default_init_t)`, where new elements are constructed
566using [@http://en.cppreference.com/w/cpp/language/default_initialization default initialization].
567
568[endsect]
569
570[section:ordered_range_insertion Ordered range insertion for associative containers (['ordered_unique_range], ['ordered_range]) ]
571
572When filling associative containers big performance gains can be achieved if the input range to be inserted
573is guaranteed by the user to be ordered according to the predicate. This can happen when inserting values from a `set` to
574a `multiset` or between different associative container families (`[multi]set/map` vs. `flat_[multi]set/map`).
575
576[*Boost.Container] has some overloads for constructors and insertions taking an `ordered_unique_range_t` or
577an `ordered_range_t` tag parameters as the first argument. When an `ordered_unique_range_t` overload is used, the
578user notifies the container that the input range is ordered according to the container predicate and has no
579duplicates. When an `ordered_range_t` overload is used, the
580user notifies the container that the input range is ordered according to the container predicate but it might
581have duplicates. With this information, the container can avoid multiple predicate calls and improve insertion
582times.
583
584[endsect]
585
586[section:constant_time_range_splice Constant-time range splice for `(s)list`]
587
588In the first C++ standard `list::size()` was not required to be constant-time,
589and that caused some controversy in the C++ community. Quoting Howard Hinnant's
590[@http://howardhinnant.github.io/On_list_size.html ['On List Size]] paper:
591
592[: ['There is a considerable debate on whether `std::list<T>::size()` should be O(1) or O(N).
593The usual argument notes that it is a tradeoff with:]
594
595`splice(iterator position, list& x, iterator first, iterator last);`
596
597['If size() is O(1) and this != &x, then this method must perform a linear operation so that it
598can adjust the size member in each list]]
599
600C++11 definitely required `size()` to be O(1), so range splice became O(N). However,
601Howard Hinnant's paper proposed a new `splice` overload so that even O(1) `list:size()`
602implementations could achieve O(1) range splice when the range size was known to the caller:
603
604[: `void splice(iterator position, list& x, iterator first, iterator last, size_type n);`
605
606   [*Effects]: Inserts elements in the range [first, last) before position and removes the elements from x.
607
608   [*Requires]: [first, last) is a valid range in x. The result is undefined if position is an iterator in the range [first, last). Invalidates only the iterators and references to the spliced elements. n == distance(first, last).
609
610   [*Throws]: Nothing.
611
612   [*Complexity]: Constant time.
613]
614
615This new splice signature allows the client to pass the distance of the input range in.
616This information is often available at the call site. If it is passed in,
617then the operation is constant time, even with an O(1) size.
618
619[*Boost.Container] implements this overload for `list` and a modified version of it for `slist`
620(as `slist::size()` is also `O(1)`).
621
622[endsect]
623
624[endsect]
625
626[section:configurable_containers Extended functionality: Configurable containers]
627
628[*Boost.Container] offers the possibility to configure at compile time some parameters of
629several containers, apart from the stored type and the allocator. This configuration is passed as
630the last template parameter and defined using the utility classes. The following containers can receive
631useful configuration options:
632
633[section:configurable_tree_based_associative_containers Configurable tree-based associative ordered containers]
634
635[classref boost::container::set set], [classref boost::container::multiset multiset],
636[classref boost::container::map map] and [classref boost::container::multimap multimap] associative containers
637are implemented as binary search trees which offer the needed complexity and stability guarantees required by the
638C++ standard for associative containers.
639
640[*Boost.Container] offers the possibility to configure at compile time some parameters of the binary search tree
641implementation. This configuration is passed as the last template parameter and defined using the utility class
642[classref boost::container::tree_assoc_options tree_assoc_options]. The following parameters can be configured:
643
644*  The underlying [*tree implementation] type ([classref boost::container::tree_type tree_type]).
645   By default these containers use a red-black tree but the user can use other tree types:
646   *  [@http://en.wikipedia.org/wiki/Red%E2%80%93black_tree Red-Black Tree]
647   *  [@http://en.wikipedia.org/wiki/Avl_trees AVL tree]
648   *  [@http://en.wikipedia.org/wiki/Scapegoat_tree Scapegoat tree]. In this case Insertion and Deletion
649      are amortized O(log n) instead of O(log n).
650   *  [@http://en.wikipedia.org/wiki/Splay_tree Splay tree]. In this case Searches, Insertions and Deletions
651      are amortized O(log n) instead of O(log n).
652
653*  Whether the [*size saving] mechanisms are used to implement the tree nodes
654   ([classref boost::container::optimize_size optimize_size]). By default this option is activated and is only
655   meaningful to red-black and avl trees (in other cases, this option will be ignored).
656   This option will try to put rebalancing metadata inside the "parent" pointer of the node if the pointer
657   type has enough alignment. Usually, due to alignment issues, the metadata uses the size of a pointer yielding
658   to four pointer size overhead per node, whereas activating this option usually leads to 3 pointer size overhead.
659   Although some mask operations must be performed to extract
660   data from this special "parent" pointer, in several systems this option also improves performance due to the
661   improved cache usage produced by the node size reduction.
662
663See the following example to see how [classref boost::container::tree_assoc_options tree_assoc_options] can be
664used to customize these containers:
665
666[import ../example/doc_custom_tree.cpp]
667[doc_custom_tree]
668
669[endsect]
670
671[section:configurable_vectors Configurable vectors]
672
673The configuration for [classref boost::container::vector vector] is passed as
674the last template parameter and defined using the utility class
675[classref boost::container::vector_options vector_options]. The following parameters can be configured:
676
677*  [classref boost::container::growth_factor growth_factor]: the growth policy of the vector.
678   The rate at which the capacity of a vector grows is implementation dependent and
679   implementations choose exponential growth in order to meet the amortized constant time requirement for push_back.
680   A higher growth factor will make it faster as it will require less data movement, but it will have a greater memory
681   impact (on average, more memory will be unused). A user can provide a custom implementation of the growth factor and some
682   predefined policies are available: [classref boost::container::growth_factor_50 growth_factor_50],
683   [classref boost::container::growth_factor_60 growth_factor_60] and
684   [classref boost::container::growth_factor_50 growth_factor_100].
685
686*  [classref boost::container::stored_size stored_size]: the type that will be used to store size-related
687   parameters inside of the vector. Sometimes, when the maximum capacity to be used is much less than the
688   theoretical maximum that a vector can hold, it's interesting to use smaller unsigned integer types to represent
689   `size()` and `capacity()` inside vector, so that the size of an empty vector is minimized and cache
690   performance might be improved. See [classref boost::container::stored_size stored_size] for more details.
691
692See the following example to see how [classref boost::container::vector_options vector_options] can be
693used to customize `vector` container:
694
695[import ../example/doc_custom_vector.cpp]
696[doc_custom_vector]
697
698[endsect]
699
700[section:configurable_deques Configurable deques]
701
702The configuration for [classref boost::container::deque deque] is passed as
703the last template parameter and defined using the utility class
704[classref boost::container::deque_options deque_options]. The following parameters can be configured:
705
706Parameters that control the size of deque's 'block' (deque allocates contiguous chunks of elements, called 'blocks').
707Only one of these paratemers can be specified:
708
709*  [classref boost::container::block_bytes block_bytes]: the number of bytes deque will allocate for store
710   elements contiguously: `deque::get_block_size()` will return aproximately `block_bytes/sizeof(value_type)`.
711   A value of zero means the default value.
712
713*  [classref boost::container::block_size  block_size]: the number of elements deque will allocate contiguously.
714   If this option is specified, `deque::get_block_size()` will return the specified `block_size`.
715   A value of zero means the default value.
716
717See the following example to see how [classref boost::container::deque_options deque_options] can be
718used to customize `deque` container:
719
720[import ../example/doc_custom_deque.cpp]
721[doc_custom_deque]
722
723[endsect]
724
725[section:configurable_static_vectors Configurable static vector]
726
727The configuration for [classref boost::container::static_vector static_vector] is passed as
728the last template parameter and defined using the utility class
729[classref boost::container::static_vector_options static_vector_options]. The following parameters can be configured:
730
731*  [classref boost::container::inplace_alignment inplace_alignment]: the minimum alignment (in bytes) that the stored value type
732   needs. This option allows static vectors that need non-default alignments, e.g., to be used in SIMD operations.
733
734*  [classref boost::container::throw_on_overflow throw_on_overflow]: A boolean that specifies if the
735   container should throw an exception when the compile-time capacity is not enough to hold the requesteed number
736   of objects. When "false", if the capacit is overflowd, the implementation calls to BOOST_ASSERT and if that assertion
737   does not throw or abort, undefined behavior is triggered.
738
739See the following example to see how [classref boost::container::static_vector_options static_vector_options] can be
740used to customize `static_vector` container:
741
742[import ../example/doc_custom_static_vector.cpp]
743[doc_custom_static_vector]
744
745[endsect]
746
747[section:configurable_small_vectors Configurable small vector]
748
749The configuration for [classref boost::container::small_vector small_vector] is passed as
750the last template parameter and defined using the utility class
751[classref boost::container::small_vector_options small_vector_options]. The following parameters can be configured:
752
753*  [classref boost::container::inplace_alignment inplace_alignment]: the minimum alignment (in bytes) for the in-place storage
754   used to build the "small" number of elements. [*The alignment of the dynamic memory must be provided by the allocator
755   and it is not affected by this option].
756
757*  [classref boost::container::growth_factor growth_factor]: the growth policy of the vector.
758   The rate at which the capacity of a vector grows is implementation dependent and
759   implementations choose exponential growth in order to meet the amortized constant time requirement for push_back.
760   A higher growth factor will make it faster as it will require less data movement, but it will have a greater memory
761   impact (on average, more memory will be unused). A user can provide a custom implementation of the growth factor and some
762   predefined policies are available: [classref boost::container::growth_factor_50 growth_factor_50],
763   [classref boost::container::growth_factor_60 growth_factor_60] and
764   [classref boost::container::growth_factor_50 growth_factor_100].
765
766See the following example to see how [classref boost::container::small_vector_options small_vector_options] can be
767used to customize `small_vector` container:
768
769[import ../example/doc_custom_small_vector.cpp]
770[doc_custom_small_vector]
771
772[endsect]
773
774[endsect]
775
776[section:extended_allocators Extended functionality: Extended allocators]
777
778Many C++ programmers have ever wondered where does good old realloc fit in C++. And that's a good question.
779Could we improve [classref boost::container::vector vector] performance using memory expansion mechanisms
780to avoid too many copies? But [classref boost::container::vector vector] is not the only container that
781could benefit from an improved allocator interface: we could take advantage of the insertion of multiple
782elements in [classref boost::container::list list] using a burst allocation mechanism that could amortize
783costs (mutex locks, free memory searches...) that can't be amortized when using single node allocation
784strategies.
785
786These improvements require extending the STL allocator interface and use make use of a new
787general purpose allocator since new and delete don't offer expansion and burst capabilities.
788
789*  [*Boost.Container] containers support an extended allocator interface based on an evolution of proposals
790[@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1953.html N1953: Upgrading the Interface of Allocators using API Versioning],
791[@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2045.html N2045: Improving STL allocators]
792and the article
793[@http://www.drivehq.com/web/igaztanaga/allocplus/ Applying classic memory allocation strategies to C++ containers].
794The extended allocator interface is implemented by [classref boost::container::allocator allocator],
795[classref boost::container::adaptive_pool adaptive_pool] and [classref boost::container::node_allocator node_allocator]
796classes.
797
798*  Extended allocators use a modified [@http://g.oswego.edu/dl/html/malloc.html Doug Lea Malloc (DLMalloc)] low-level
799allocator and offers an C API to implement memory expansion and burst allocations. DLmalloc is known to be very size
800and speed efficient, and this allocator is used as the basis of many malloc implementations, including multithreaded
801allocators built above DLmalloc (See [@http://www.malloc.de/en/ ptmalloc2, ptmalloc3] or
802[@http://www.nedprod.com/programs/portable/nedmalloc/ nedmalloc]). This low-level allocator is implemented as
803a separately compiled library and the following extended allocators depend on the library:
804
805*  [classref boost::container::allocator allocator]: This extended allocator offers expansion, shrink-in place
806   and burst allocation capabilities implemented as a thin wrapper around the modified DLMalloc.
807   It can be used with all containers and it should be the default choice when the programmer wants to use
808   extended allocator capabilities.
809
810*  [classref boost::container::node_allocator node_allocator]: It's a
811   [@http://www.boost.org/doc/libs/1_55_0/libs/pool/doc/html/boost_pool/pool/pooling.html#boost_pool.pool.pooling.simple Simple Segregated Storage]
812   allocator, similar to [*Boost.Pool] that takes advantage of the modified DLMalloc burst interface. It does not return
813   memory to the DLMalloc allocator (and thus, to the system), unless explicitly requested. It does offer a very small
814   memory overhead so it's suitable for node containers ([boost::container::list list], [boost::container::slist slist]
815   [boost::container::set set]...) that allocate very small `value_type`s and it offers improved node allocation times
816   for single node allocations with respecto to [classref boost::container::allocator allocator].
817
818*  [classref boost::container::adaptive_pool adaptive_pool]: It's a low-overhead node allocator that can return memory
819   to the system. The overhead can be very low (< 5% for small nodes) and it's nearly as fast as [classref boost::container::node_allocator node_allocator].
820   It's also suitable for node containers.
821
822Use them simply specifying the new allocator in the corresponding template argument of your favourite container:
823
824[import ../example/doc_extended_allocators.cpp]
825[doc_extended_allocators]
826
827[endsect]
828
829[section:cpp_conformance C++11/C++14/C++17 Conformance]
830
831[*Boost.Container] aims for full C++11 conformance except reasoned deviations,
832backporting as much as possible for C++03. Obviously, this conformance is a work
833in progress so this section explains what C++11/C++14/C++17 features are implemented and which
834of them have been backported to earlier standard conformig compilers.
835
836[section:move_emplace Move and Emplace]
837
838For compilers with rvalue references and for those C++03 types that use
839[@http://www.boost.org/libs/move Boost.Move] rvalue reference emulation
840[*Boost.Container] supports all C++11 features related to move semantics: containers
841are movable, requirements for `value_type` are those specified for C++11 containers.
842
843For compilers with variadic templates, [*Boost.Container] supports placement insertion
844(`emplace`, ...) functions from C++11. For those compilers without variadic templates
845support [*Boost.Container] uses the preprocessor to create a set of overloads up to
846a finite number of parameters.
847
848[endsect]
849
850[section:alloc_traits_move_traits Stateful allocators]
851
852C++03 was not stateful-allocator friendly. For compactness of container objects and for
853simplicity, it did not require containers to support allocators with state: Allocator objects
854need not be stored in container objects. It was not possible to store an allocator with state,
855say an allocator that holds a pointer to an arena from which to allocate. C++03 allowed implementors
856to suppose two allocators of the same type always compare equal (that means that memory allocated
857by one allocator object could be deallocated by another instance of the same type) and
858allocators were not swapped when the container was swapped.
859
860C++11 further improves stateful allocator support through
861[@http://en.cppreference.com/w/cpp/memory/allocator_traits `std::allocator_traits`].
862`std::allocator_traits` is the protocol between a container and an allocator, and
863an allocator writer can customize its behaviour (should the container propagate it in
864move constructor, swap, etc.?) following `allocator_traits` requirements. [*Boost.Container]
865not only supports this model with C++11 but also [*backports it to C++03] via
866[classref boost::container::allocator_traits boost::container::allocator_traits] including some
867C++17 changes. This class
868offers some workarounds for C++03 compilers to achieve the same allocator guarantees as
869`std::allocator_traits`.
870
871In [Boost.Container] containers, if possible, a single allocator is hold to construct
872`value_type`s. If the container needs an auxiliary
873allocator (e.g. an array allocator used by `deque` or `stable_vector`), that allocator is also
874stored in the container and initialized from the user-supplied allocator when the
875container is constructed (i.e. it's not constructed on the fly when auxiliary memory is needed).
876
877[endsect]
878
879[section:scoped_allocator Scoped allocators]
880
881C++11 improves stateful allocators with the introduction of
882[@http://en.cppreference.com/w/cpp/memory/scoped_allocator_adaptor `std::scoped_allocator_adaptor`]
883class template. `scoped_allocator_adaptor` is instantiated with one outer allocator and zero or more inner
884allocators.
885
886A scoped allocator is a mechanism to automatically propagate the state of the allocator to the subobjects
887of a container in a controlled way. If instantiated with only one allocator type, the inner allocator
888becomes the `scoped_allocator_adaptor` itself, thus using the same allocator
889resource for the container and every element within the container and, if the elements themselves are
890containers, each of their elements recursively. If instantiated with more than one allocator, the first allocator
891is the outer allocator for use by the container, the second allocator is passed to the constructors of the
892container's elements, and, if the elements themselves are containers, the third allocator is passed to the
893elements' elements, and so on.
894
895[*Boost.Container] implements its own [classref boost::container::scoped_allocator_adaptor scoped_allocator_adaptor]
896class and [*backports this feature also
897to C++03 compilers]. Due to C++03 limitations, in those compilers
898the allocator propagation implemented by `scoped_allocator_adaptor::construct` functions
899will be based on traits ([classref boost::container::constructible_with_allocator_suffix constructible_with_allocator_suffix]
900and [classref boost::container::constructible_with_allocator_prefix constructible_with_allocator_prefix])
901proposed in [@http://www.open-std.org/jtc1/sc22/WG21/docs/papers/2008/n2554.pdf
902N2554: The Scoped Allocator Model (Rev 2) proposal]. In conforming C++11 compilers or compilers supporting SFINAE
903expressions (when `BOOST_NO_SFINAE_EXPR` is NOT defined), traits are ignored and C++11 rules
904(`is_constructible<T, Args..., inner_allocator_type>::value` and
905`is_constructible<T, allocator_arg_t, inner_allocator_type, Args...>::value`)
906will be used to detect if the allocator must be propagated with suffix or prefix allocator arguments.
907
908[endsect]
909
910[section:insertion_hints Insertion hints in associative containers and preserving
911 insertion ordering for elements with equivalent keys]
912
913[@http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#233 LWG Issue #233] corrected a defect
914in C++98 and specified how equivalent keys were to be inserted in associative containers. [*Boost.Container]
915implements the C++11 changes that were specified in [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1780.html N1780
916['Comments on LWG issue 233: Insertion hints in associative containers]]:
917
918* `a_eq.insert(t)`: If a range containing elements equivalent to t exists in a_eq, t is inserted at the end of that range.
919* `a_eq.insert(p,t)`: t is inserted as close as possible to the position just prior to p.
920
921[endsect]
922
923[section:initializer_lists Initializer lists]
924
925[*Boost.Container] supports initialization, assignments and insertions from initializer lists
926in compilers that implement this feature.
927
928[endsect]
929
930[section:null_iterators Null Forward Iterators]
931
932[*Boost.Container] implements
933[@http://www.open-std.org/JTC1/sc22/WG21/docs/papers/2013/n3644.pdf C++14 Null Forward Iterators],
934which means that value-initialized iterators may be compared and compare equal
935to other value-initialized iterators of the same type. Value initialized iterators behave as if they refer
936past the end of the same empty sequence (example taken from N3644):
937
938[c++]
939
940   vector<int> v = { ... };
941   auto ni = vector<int>::iterator();
942   auto nd = vector<double>::iterator();
943   ni == ni; // True.
944   nd != nd; // False.
945   v.begin() == ni; // ??? (likely false in practice).
946   v.end() == ni;   // ??? (likely false in practice).
947   ni == nd; // Won't compile.
948
949[endsect]
950
951[section:polymorphic_memory_resources Polymorphic Memory Resources ]
952
953The document
954[@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4480.html C++ Extensions for Library Fundamentals (final draft)]
955includes classes that provide allocator type erasure and runtime polymorphism. As Pablo Halpern, the author of the proposal,
956explains in the paper ([@https://isocpp.org/files/papers/N3916.pdf N3916 Polymorphic Memory Resources (r2)]):
957
958["['A significant impediment to effective memory management in C++ has been the
959inability to use allocators in non-generic contexts.  In large software systems,
960most of  the application program consists of non-generic procedural or
961object-oriented code that is compiled once and linked many times.]]
962
963["['Allocators in C++, however, have historically relied solely on
964compile-time polymorphism, and therefore have not been suitable for use in vocabulary
965types, which are passed through interfaces between separately-compiled modules,
966because the allocator type necessarily affects the type of the object that uses it.
967This proposal builds upon the improvements made to allocators in
968C++11 and describes a set of facilities for runtime polymorphic memory
969resources that interoperate with the existing compile-time polymorphic
970allocators.]]
971
972Most utilities from the Fundamentals TS were merged into C++17, but
973[*Boost.Container] offers them for C++03, C++11 and C++14 compilers.
974
975[*Boost.Container] implements nearly all classes of the proposal under
976the namespace `boost::container::pmr`. There are two groups,
977
978*  Header only utilities (these don't require the separately compiled library):
979   *	[classref boost::container::pmr::memory_resource memory_resource].
980   *	[classref boost::container::pmr::resource_adaptor resource_adaptor].
981
982*  Utilities that require the the separately compiled library:
983   *	[classref boost::container::pmr::polymorphic_allocator polymorphic_allocator].
984   *	[classref boost::container::pmr::monotonic_buffer_resource monotonic_buffer_resource].
985   *	[classref boost::container::pmr::unsynchronized_pool_resource unsynchronized_pool_resource].
986   *	[classref boost::container::pmr::synchronized_pool_resource synchronized_pool_resource].
987   *  Global resource functions: [funcref  boost::container::pmr::get_default_resource get_default_resource]/
988      [funcref  boost::container::pmr::set_default_resource set_default_resource]/
989      [funcref  boost::container::pmr::new_delete_resource  new_delete_resource]/
990      [funcref  boost::container::pmr::null_memory_resource null_memory_resource]
991   *  Aliases for boost containers using the polymorphic allocator
992      (like [classref boost::container::pmr::vector pmr::vector], etc.)
993
994[*Boost.Container]'s polymorphic resource library is usable from C++03 containers,
995and offers some alternative utilities if the required C++11 features of the
996['Library Fundamentals] specification are not available.
997
998[import ../example/doc_pmr.cpp]
999
1000Let's review the usage example given in
1001[@https://isocpp.org/files/papers/N3916.pdf N3916] and see how it can be implemented
1002using [*Boost.Container]: ['Suppose we are processing a series of shopping lists, where a shopping list is a
1003container of strings, and storing them in a collection (a list) of shopping lists.
1004Each shopping list being processed uses a bounded amount of memory that is needed for
1005a short period of time, while the collection of shopping lists uses an unbounded
1006amount of memory and will exist for a longer period of time. For efficiency, we can
1007use a more time-efficient memory allocator based on a finite buffer for the temporary
1008shopping lists.]
1009
1010Let's see how `ShoppingList` can be defined to support an polymorphic memory resource
1011that can allocate memory from different underlying mechanisms. The most important
1012details are:
1013
1014* It should declare that supports an allocator defining an `allocator_type` typedef.
1015  This `allocator_type` will be of type [classref boost::container::pmr::memory_resource memory_resource *],
1016  which is a base class for polymorphic resources.
1017* It must define constructors that take the
1018  the allocator as argument. It can be implemented in two ways:
1019   * `ShoppingList` has constructors taking
1020      [classref boost::container::pmr::memory_resource memory_resource*] as the last argument.
1021   * `ShoppingList` has constructors taking
1022      [classref boost::container::allocator_arg_t allocator_arg_t] as the first argument
1023     and [classref boost::container::pmr::memory_resource memory_resource*] as the second argument.
1024
1025[*Note:] ['In C++03 compilers, it is required that the programmer specializes as `true`
1026[classref boost::container::constructible_with_allocator_suffix constructible_with_allocator_suffix] or
1027[classref boost::container::constructible_with_allocator_prefix constructible_with_allocator_prefix]
1028as in C++03 there is no way to automatically detect the chosen option at compile time. If
1029no specialization is done, [*Boost.Container] assumes the suffix option].
1030
1031[doc_pmr_ShoppingList_hpp]
1032
1033['However, this time-efficient allocator is not appropriate for the longer
1034lived collection of shopping lists. This example shows how those temporary shopping
1035lists, using a time-efficient allocator, can be used to populate the long lived collection
1036of shopping lists, using a general purpose allocator, something that would be
1037annoyingly difficult without the polymorphic allocators.]
1038
1039In [*Boost.Container] for the time-efficient allocation we can use
1040[classref boost::container::pmr::monotonic_buffer_resource monotonic_buffer_resource],
1041providing an external buffer that will be used until it's exhausted. In the default
1042configuration, when the buffer is exhausted, the default memory resource will be used
1043instead.
1044
1045[doc_pmr_main_cpp]
1046
1047['Notice that the shopping lists within `folder` use the default allocator resource
1048whereas the shopping list `temporaryShoppingList` uses the short-lived but very fast
1049`buf_rsrc`. Despite using different allocators, you can insert
1050`temporaryShoppingList` into folder because they have the same `ShoppingList`
1051type. Also, while `ShoppingList` uses memory_resource directly,
1052[classref boost::container::pmr::list pmr::list],
1053[classref boost::container::pmr::vector pmr::vector]
1054and [classref boost::container::pmr::string pmr::string] all use
1055[classref boost::container::pmr::polymorphic_allocator polymorphic_allocator].]
1056
1057['The resource passed to the `ShoppingList` constructor is propagated to the vector and
1058each string within that `ShoppingList`. Similarly, the resource used to construct
1059`folder` is propagated to the constructors of the ShoppingLists that are inserted into
1060the list (and to the strings within those `ShoppingLists`). The
1061[classref boost::container::pmr::polymorphic_allocator polymorphic_allocator]
1062template is designed to be almost interchangeable with a pointer to
1063[classref boost::container::pmr::memory_resource memory_resource],
1064thus producing a ['bridge] between the template-policy
1065style of allocator and the polymorphic-base-class style of allocator.]
1066
1067This example actually shows how easy is to use [*Boost.Container] to write
1068type-erasured allocator-capable classes even in C++03 compilers.
1069
1070[endsect]
1071
1072
1073[section:forward_list `forward_list<T>`]
1074
1075[*Boost.Container] does not offer C++11 `forward_list` container yet, but it will be available in future
1076versions.
1077
1078[endsect]
1079
1080[section:vector_exception_guarantees `vector` vs. `std::vector` exception guarantees]
1081
1082[classref boost::container::vector vector] does not support the strong exception guarantees
1083given by `std::vector` in functions like `insert`, `push_back`, `emplace`, `emplace_back`,
1084`resize`, `reserve` or `shrink_to_fit` for either copyable or no-throw moveable classes.
1085In C++11 [@http://en.cppreference.com/w/cpp/utility/move_if_noexcept move_if_noexcept] is used
1086to maintain C++03 exception safety guarantees combined with C++11 move semantics.
1087This strong exception guarantee degrades the insertion performance of copyable and throwing-moveable types,
1088degrading moves to copies when such types are inserted in the vector using the aforementioned
1089members.
1090
1091This strong exception guarantee also precludes the possibility of using some type of
1092in-place reallocations that can further improve the insertion performance of `vector` See
1093[link container.extended_allocators Extended Allocators] to know more
1094about these optimizations.
1095
1096[classref boost::container::vector vector] always uses move constructors/assignments
1097to rearrange elements in the vector and uses memory expansion mechanisms if the allocator supports them,
1098while offering only basic safety guarantees. It trades off exception guarantees for an improved performance.
1099
1100[endsect]
1101
1102[section:container_const_reference_parameters Parameter taken by const reference that can be changed]
1103
1104Several container operations use a parameter taken by const reference that can be changed during execution of the function.
1105[@http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#526 LWG Issue 526
1106   (['Is it undefined if a function in the standard changes in parameters?])]
1107discusses them:
1108
1109[c++]
1110
1111   //Given std::vector<int> v
1112   v.insert(v.begin(), v[2]);
1113   //v[2] can be changed by moving elements of vector
1114
1115   //Given std::list<int> l:
1116   l.remove(*l.begin())
1117   //The operation could delete the first element, and then continue trying to access it.
1118
1119The adopted resolution, NAD (Not A Defect), implies that previous operations must be well-defined. This requires code
1120to detect a reference to an inserted element and an additional copy in that case, impacting performance even when
1121references to already inserted objects are not used. Note that equivalent functions taking rvalue references or
1122iterator ranges require elements not already inserted in the container.
1123
1124[*Boost.Container] prioritizes performance and has not implemented the NAD resolution:
1125in functions that might modify the argument, the library requires references to elements not stored
1126in the container. Using references to inserted elements yields to undefined behaviour (although in debug mode, this
1127precondition violation could be notified via BOOST_ASSERT).
1128
1129[endsect]
1130
1131[section:Vector_bool `vector<bool>` specialization]
1132
1133`vector<bool>` specialization has been quite problematic, and there have been several
1134unsuccessful tries to deprecate or remove it from the standard. [*Boost.Container] does not implement it
1135as there is a superior [@http://www.boost.org/libs/dynamic_bitset/ Boost.DynamicBitset]
1136solution. For issues with `vector<bool>` see the following papers:
1137
1138* [@http://howardhinnant.github.io/onvectorbool.html On `vector<bool>`]
1139* [@http://www.gotw.ca/publications/N1211.pdf vector<bool>: N1211: More Problems, Better Solutions],
1140* [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2160.html N2160: Library Issue 96: Fixing vector<bool>],
1141* [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2204.html N2204 A Specification to deprecate vector<bool>].
1142
1143Quotes:
1144
1145* ["['But it is a shame that the C++ committee gave this excellent data structure the name vector<bool> and
1146  that it gives no guidance nor encouragement on the critical generic algorithms that need to be optimized for this
1147  data structure. Consequently, few std::lib implementations go to this trouble.]]
1148
1149* ["['In 1998, admitting that the committee made a mistake was controversial.
1150  Since then Java has had to deprecate such significant portions of their libraries
1151  that the idea C++ would be ridiculed for deprecating a single minor template specialization seems quaint.]]
1152
1153* ["['`vector<bool>` is not a container and `vector<bool>::iterator` is not a random-access iterator
1154(or even a forward or bidirectional iterator either, for that matter). This has already broken user code
1155in the field in mysterious ways.]]
1156
1157* ["['`vector<bool>` forces a specific (and potentially bad) optimization choice on all users by enshrining
1158it in the standard. The optimization is premature; different users have different requirements. This too
1159has already hurt users who have been forced to implement workarounds to disable the 'optimization'
1160(e.g., by using a vector<char> and manually casting to/from bool).]]
1161
1162So `boost::container::vector<bool>::iterator` returns real `bool` references and works as a fully compliant container.
1163If you need a memory optimized version of `boost::container::vector<bool>`, please use
1164[@http://www.boost.org/libs/dynamic_bitset/ Boost.DynamicBitset].
1165
1166[endsect]
1167
1168[section:non_standard_memset_initialization Non-standard value initialization using `std::memset`]
1169
1170[*Boost.Container] uses `std::memset` with a zero value to initialize some types as in most platforms this
1171initialization yields to the desired value initialization with improved performance.
1172
1173Following the C11 standard, [*Boost.Container] assumes that ['for any integer type,
1174the object representation where all the bits are zero shall be a representation of the value
1175zero in that type]. Since `_Bool`/`wchar_t`/`char16_t`/`char32_t` are also integer types in C, it considers
1176all C++ integral types as initializable via `std::memset`.
1177
1178By default, [*Boost.Container] also considers floating point types to be initializable using `std::memset`.
1179Most platforms are compatible with this initialization, but in case this initialization is not desirable the
1180user can `#define BOOST_CONTAINER_MEMZEROED_FLOATING_POINT_IS_NOT_ZERO` before including library headers.
1181
1182By default, it also considers pointer types (pointer and pointer to function types, excluding
1183member object and member function pointers) to be initializable using `std::memset`.
1184Most platforms are compatible with this initialization, but in case this initialization is not desired the
1185user can `#define BOOST_CONTAINER_MEMZEROED_POINTER_IS_NOT_ZERO` before including library headers.
1186
1187If neither `BOOST_CONTAINER_MEMZEROED_FLOATING_POINT_IS_NOT_ZERO` nor
1188`BOOST_CONTAINER_MEMZEROED_POINTER_IS_NOT_ZERO` is defined [*Boost.Container] also considers POD
1189types to be value initializable via `std::memset` with value zero.
1190
1191[endsect]
1192
1193[endsect]
1194
1195[section:known_issues Known Issues]
1196
1197[section:move_emulation_limitations Move emulation limitations in C++03 compilers]
1198
1199[*Boost.Container] uses [*Boost.Move] to implement move semantics both in C++03 and C++11 compilers.
1200However, as explained in
1201[@http://www.boost.org/doc/libs/release/doc/html/move/emulation_limitations.html Emulation limitations],
1202there are some limitations in C++03 compilers that might surprise [*Boost.Container] users.
1203
1204The most noticeable problem is when [*Boost.Container] containers are placed in a struct with a
1205compiler-generated assignment operator:
1206
1207[c++]
1208
1209   class holder
1210   {
1211      boost::container::vector<MyType> vect;
1212   };
1213
1214   void func(const holder& h)
1215   {
1216      holder copy_h(h); //<--- ERROR: can't convert 'const holder&' to 'holder&'
1217      //Compiler-generated copy constructor is non-const:
1218      // holder& operator(holder &)
1219      //!!!
1220   }
1221
1222This limitation forces the user to define a const version of the copy assignment, in all classes
1223holding containers, which might be annoying in some cases.
1224
1225[endsect]
1226
1227[endsect]
1228
1229[section:history_and_reasons History and reasons to use Boost.Container]
1230
1231[section:boost_container_history Boost.Container history]
1232
1233[*Boost.Container] is a product of a long development effort that started
1234[@http://lists.boost.org/Archives/boost/2004/11/76263.php in 2004 with the experimental Shmem library],
1235which pioneered the use of standard containers in shared memory. Shmem included modified SGI STL container
1236code tweaked to support non-raw `allocator::pointer` types and stateful allocators. Once reviewed,
1237Shmem was accepted as [@http://www.boost.org/libs/interprocess/ Boost.Interprocess] and this library
1238continued to refine and improve those containers.
1239
1240In 2007, container code from node containers (`map`, `list`, `slist`) was rewritten, refactored
1241and expanded to build the intrusive container library [@http://www.boost.org/libs/intrusive/ Boost.Intrusive].
1242[*Boost.Interprocess] containers were refactored to take advantage of [*Boost.Intrusive] containers and
1243code duplication was minimized. Both libraries continued to gain support and bug fixes for years.
1244They introduced move semantics, emplacement insertion and more features of then unreleased C++0x
1245standard.
1246
1247[*Boost.Interprocess] containers were always standard compliant, and those containers and new
1248containers like `stable_vector` and `flat_[multi]set/map` were used outside [*Boost.Interprocess]
1249with success. As containers were mature enough to get their own library, it was a natural step to
1250collect them containers and build [*Boost.Container], a library targeted to a wider audience.
1251
1252[endsect]
1253
1254
1255[section:Why_boost_container Why Boost.Container?]
1256
1257With so many high quality standard library implementations out there, why would you want to
1258use [*Boost.Container]? There are several reasons for that:
1259
1260* Even if you have a earlier standard conforming compiler, you still can have access to many
1261  of the latest C++ standard features and have an easy code migration when you change your compiler.
1262* It's compatible with [*Boost.Interprocess] shared memory allocators.
1263* You have extremely useful new containers like `[stable/static/small]_vector` and `flat_[multi]set/map`.
1264* If you work on multiple platforms, you'll have a portable behaviour without depending
1265  on the std-lib implementation conformance of each platform. Some examples:
1266   * Default constructors don't allocate memory at all, which improves performance and
1267   usually implies a no-throw guarantee (if predicate's or allocator's default constructor doesn't throw).
1268   * Small string optimization for [classref boost::container::basic_string basic_string].
1269* [link container.extended_functionality Extended functionality] beyond the standard based
1270   on user feedback to improve code performance.
1271* You need a portable implementation that works when compiling without exceptions support or
1272  you need to customize the error handling when a container needs to signal an exceptional error.
1273
1274[endsect]
1275
1276[endsect]
1277
1278[include auto_index_helpers.qbk]
1279
1280[section:index Indexes]
1281
1282[named_index class_name Class Index]
1283[named_index typedef_name Typedef Index]
1284[named_index function_name Function Index]
1285[/named_index macro_name Macro Index]
1286[/index]
1287
1288[endsect]
1289
1290[xinclude autodoc.xml]
1291
1292[section:acknowledgements_notes Acknowledgements, notes and links]
1293
1294*  Original standard container code comes from [@http://www.sgi.com/tech/stl/ SGI STL library],
1295   which enhanced the original HP STL code. Code was rewritten for
1296   [*Boost.Interprocess] and moved to [*Boost.Intrusive]. Many thanks to Alexander Stepanov, Meng Lee, David Musser,
1297   Matt Austern... and all HP and SGI STL developers.
1298
1299*  `flat_[multi]_map/set` containers were originally based on [@http://en.wikipedia.org/wiki/Loki_%28C%2B%2B%29 Loki's]
1300   AssocVector class. Code was rewritten and expanded for [*Boost.Interprocess], so thanks to Andrei Alexandrescu.
1301
1302*  `stable_vector` was invented and coded by
1303   [@http://bannalia.blogspot.com/2008/09/introducing-stablevector.html Joaqu\u00EDn M. L\u00F3pez Mu\u00F1oz],
1304   then adapted for [*Boost.Interprocess]. Thanks for such a great container.
1305
1306*  `static_vector` was based on Andrew Hundt's and Adam Wulkiewicz's high-performance `varray` class.
1307   Many performance improvements of `vector` were also inspired by their implementation. Thanks!
1308
1309*  Howard Hinnant's help and advices were essential when implementing move semantics,
1310   improving allocator support or implementing small string optimization. Thanks Howard
1311   for your wonderful standard library implementations.
1312
1313*  And finally thanks to all Boosters who helped all these years, improving, fixing and
1314   reviewing all my libraries.
1315
1316[endsect]
1317
1318[section:release_notes Release Notes]
1319
1320[section:release_notes_boost_1_74_00 Boost 1.74 Release]
1321
1322* Fixed bugs/issues:
1323   * [@https://github.com/boostorg/container/issues/125    GitHub #125: ['"flat_map doc misleading complexity"]].
1324   * [@https://github.com/boostorg/container/issues/126    GitHub #126: ['"flat_set.hpp and set.hpp in pmr have the same header guard"]].
1325   * [@https://github.com/boostorg/container/issues/128    GitHub #128: ['"moved from small_vector and static_vector calls destructor on elements in static part"]].
1326   * [@https://github.com/boostorg/container/issues/129    GitHub #129: ['"Alias templates for small_flat_[multi]{set|map} using small_vector as container"]].
1327   * [@https://github.com/boostorg/container/pull/135      GitHub #135: ['"Missing BOOST_NORETURN for user defined functions"]].
1328   * [@https://github.com/boostorg/container/pull/137      GitHub #137: ['"RandomAccessIterator + 0"]].
1329   * [@https://github.com/boostorg/container/pull/138      GitHub #138: ['"Remove Classes from Global Namespace"]].
1330   * [@https://github.com/boostorg/container/issues/142    GitHub #142: ['"memset called with null pointer"]].
1331   * [@https://github.com/boostorg/container/issues/144    GitHub #144: ['"GCC suggest-override warnings"]].
1332   * [@https://github.com/boostorg/container/issues/145    GitHub #145: ['"Allocations not handled correctly in some cases of vector move with unequal allocators"]].
1333   * [@https://github.com/boostorg/container/pull/146      GitHub #146: ['"Changes for Embarcadero C++ clang-based compilers, targeting Boost 1.74. Addition needed for Embarcardero clang-based compilers"]].
1334   * [@https://github.com/boostorg/container/pull/148      GitHub #148: ['"Fix static initialization issues in pmr global resources"]].
1335   * [@https://github.com/boostorg/container/pull/149      GitHub #149: ['"InitializeCriticalSectionEx returns "BOOL" (int)"]].
1336   * [@https://github.com/boostorg/container/issues/151    GitHub #151: ['"Buffer overflow in monotonic_buffer_resource::do_allocate"]].
1337
1338[endsect]
1339
1340[section:release_notes_boost_1_72_00 Boost 1.72 Release]
1341
1342* Fixed bugs:
1343   * [@https://github.com/boostorg/container/issues/127    GitHub #127: ['"Fix docs for static_vector::max_size() and capacity()"]].
1344   * [@https://github.com/boostorg/container/issues/132    GitHub #132: ['"flat_map::lower_bound and upper_bound have wrong/misleading docs"]].
1345   * [@https://github.com/boostorg/container/issues/133    GitHub #133: ['"basic_string move constructor with allocator argument has incorrect allocator check"]].
1346
1347[endsect]
1348
1349[section:release_notes_boost_1_71_00 Boost 1.71 Release]
1350
1351* Fixed bugs:
1352   * [@https://github.com/boostorg/container/pull/47    GitHub #47: ['"added alignment specification for small_vector"]].
1353   * [@https://github.com/boostorg/container/issues/88  GitHub #88: ['"Implement C++17 MoveAssignable requirements for self-move assignments"]].
1354   * [@https://github.com/boostorg/container/issues/107 GitHub #107: ['"Alignment ignored in resource_adaptor"]].
1355   * [@https://github.com/boostorg/container/pull/109   GitHub #109: ['"Get rid of integer overflow in copy_move_algo.hpp (-fsanitize=integer)"]].
1356   * [@https://github.com/boostorg/container/pull/110   GitHub #110: ['"Avoid gcc 9 deprecated copy warnings in new_allocator.hpp"]].
1357   * [@https://github.com/boostorg/container/issues/112 GitHub #112: ['"vector::resize() compilation error with msvc-10..12: data is not a member of boost::detail::aligned_storage"]].
1358   * [@https://github.com/boostorg/container/issues/114 GitHub #114: ['"Fix small_vector noexcept specification"]].
1359   * [@https://github.com/boostorg/container/issues/116 GitHub #116: ['"MSVC + boost 1.70 compilation error when windows.h is already included (detail/thread_mutex.hpp)"]].
1360   * [@https://github.com/boostorg/container/issues/117 GitHub #117: ['"flat_map/map::insert_or_assign with hint has wrong return types"]].
1361   * [@https://github.com/boostorg/container/issues/118 GitHub #118: ['"Non-unique inplace_set_difference used in in flat_tree_merge_unique and iterator invalidation in insert_unique"]].
1362   * [@https://github.com/boostorg/container/issues/122 GitHub #122: ['"Fix has_trivial_destructor_after_move"]].
1363   * [@https://github.com/boostorg/container/issues/123 GitHub #123: ['"With heterogeneous lookup, `equal_range` can result in a range with length greater than 1"]].
1364
1365* [classref boost::container::deque deque] can now have options, using [classref boost::container::deque_options deque_options].
1366  The block size/bytes can be be specified.
1367
1368* [classref boost::container::static_vector static_vector] can now have options, using [classref boost::container::static_vector_options static_vector_options].
1369    Alignment and throwing behaviour can be be specified.
1370
1371* [classref boost::container::small_vector small_vector] can now have options, using [classref boost::container::small_vector_options small_vector_options].
1372    Alignment and growth factor can be be specified.
1373
1374[endsect]
1375
1376[section:release_notes_boost_1_70_00 Boost 1.70 Release]
1377
1378* Removed support for already deprecated GCC < 4.3 and MSVC < 9.0 (Visual 2008) compilers.
1379* Default allocator parameter changed form `new_allocator<T>` to `void` to reduce symbol lenghts.
1380* Fixed bugs:
1381   * [@https://github.com/boostorg/container/pull/96 GitHub #96: ['"Workaround: Intel compilers do not offer CTAD yet"]].
1382   * [@https://github.com/boostorg/container/issues/97 GitHub #97: ['"buffer overflow in boost::container::flat_map on FreeBSD"]].
1383   * [@https://github.com/boostorg/container/issues/98 GitHub #98: ['"flat_map: insert_or_assign does not work with hint"]].
1384   * [@https://github.com/boostorg/container/issues/100 GitHub #100: ['"Compile error on Green Hills: container_detail::flat_tree has no member insert"]].
1385   * [@https://github.com/boostorg/container/pull/103 GitHub #103: ['"Fix deallocating never-allocated storage in vector.merge()"]].
1386   * [@https://github.com/boostorg/container/pull/104 GitHub #104: ['"Fix -Wmissing-noreturn clang warnings"]].
1387   * [@https://github.com/boostorg/container/pull/105 GitHub #105: ['"Fix gcc -Wdeprecated-copy"]].
1388   * [@https://github.com/boostorg/container/issues/111 GitHub #111: ['"container::vector of interprocess::offset_ptrs to variants holding incomplete type"]].
1389
1390[endsect]
1391
1392[section:release_notes_boost_1_69_00 Boost 1.69 Release]
1393
1394* Deprecated GCC < 4.3 and MSVC < 9.0 (Visual 2008) compilers.
1395
1396* Implemented C++20 `contains()` for associative containers as specified in
1397   [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0458r2.html
1398   P0458R2: Checking for Existence of an Element in Associative Containers].
1399
1400* Fixed serious bug in heterogeneous lookup functions (is_transparent was broken).
1401
1402* Fixed bugs:
1403   * [@https://github.com/boostorg/container/issues/77 GitHub #77: ['"warning: 'sbrk' is deprecated"]].
1404   * [@https://github.com/boostorg/container/issues/79 GitHub #79: ['"Mark small_vector move operations noexcept"]].
1405   * [@https://github.com/boostorg/container/issues/80 GitHub #80: ['"flat_map deduction guides are ambiguous"]].
1406   * [@https://github.com/boostorg/container/issues/81 GitHub #81: ['"Vector with custom allocator does not support value types with operator&"]].
1407   * [@https://github.com/boostorg/container/issues/82 GitHub #82: ['"Function definition in header file"]].
1408   * [@https://github.com/boostorg/container/issues/83 GitHub #83: ['"Iterator zero incrementing leads to assert on empty vector"]].
1409   * [@https://github.com/boostorg/container/pull/84   GitHub #84: ['"Allow vector to be assigned to itself"]].
1410   * [@https://github.com/boostorg/container/pull/85   GitHub #85: ['"container: misc-typos"]].
1411   * [@https://github.com/boostorg/container/pull/86   GitHub #86: ['"Add missing warning re-enabling include"]].
1412   * [@https://github.com/boostorg/container/issues/89 GitHub #89: ['"UBSAN failures detected in preflight CI PR"]].
1413   * [@https://github.com/boostorg/container/issues/90 GitHub #90: ['"Build fails on clang-5 with libstdc++7-dev (C++17 issue)"]].
1414   * [@https://github.com/boostorg/container/issues/93 GitHub #93: ['"vector::erase memory leak"]].
1415
1416[endsect]
1417
1418[section:release_notes_boost_1_68_00 Boost 1.68 Release]
1419
1420* Improved correctness of [classref boost::container::adaptive_pool adaptive_pool] and many parameters are now compile-time
1421  constants instead of runtime constants.
1422
1423* Implemented C++14's heterogeneous lookup functions for `[multi]map/[multi]set/flat_[multi]map/flat_[multi]set`.
1424
1425* Added [@https://github.com/boostorg/container/pull/71 GitHub #71: ['"Constructor Template Auto Deduction guides "]].
1426
1427* Fixed bugs:
1428   * [@https://svn.boost.org/trac/boost/ticket/13533 Trac #13533:  ['"Boost vector resize causes assert(false)"]].
1429   * [@https://github.com/boostorg/container/issues/73 GitHub #73: ['"triviality of pair"]].
1430   * [@https://github.com/boostorg/container/issues/74 GitHub #74: ['"vector assignment not using memcpy"]].
1431   * [@https://github.com/boostorg/container/issues/75 GitHub #75: ['"flat_set: Heap overflow"]].
1432   * [@https://github.com/boostorg/container/issues/76 GitHub #76: ['"flat_set: undefined behaviour on empty range"]].
1433   * Fixed race condition bug in [classref boost::container::pmr::unsynchronized_pool_resource unsynchronized_pool_resource]
1434     found by Arthur O'Dowyer in his blog post
1435     [@https://quuxplusone.github.io/blog/2018/06/05/libcpp-memory-resource/ <memory_resource> for libc++]
1436
1437* Implemented proposed resolution for
1438  [@https://cplusplus.github.io/LWG/issue3120 ['"LWG 3120 Unclear behavior of monotonic_buffer_resource::release()"]].
1439  After `release()` the original buffer is recovered for the next allocation.
1440
1441[endsect]
1442
1443[section:release_notes_boost_1_67_00 Boost 1.67 Release]
1444
1445* ['vector] can now have options, using [classref boost::container::vector_options vector_options].
1446  The growth factor and the stored size type can be specified.
1447
1448* Improved range insertion in ['flat_[multi]map/set] containers overall complexity is reduced to O(NlogN).
1449
1450* Fixed bugs:
1451   * [@https://github.com/boostorg/container/pull/61 GitHub #61: ['"Compile problems on Android ndk r16 beta 1"]].
1452   * [@https://github.com/boostorg/container/pull/64 GitHub #64: ['"Fix splice for slist"]].
1453   * [@https://github.com/boostorg/container/issues/58 GitHub #65: ['"`pmr::monotonic_buffer_resource::allocate()` can return a pointer to freed memory after `release()` is called"]].
1454   * [@https://svn.boost.org/trac/boost/ticket/13500 Trac #13500:  ['"Memory leak when using erase on string vectors"]].
1455
1456[endsect]
1457
1458[section:release_notes_boost_1_66_00 Boost 1.66 Release]
1459
1460* ['flat_[multi]map/set] can now work as container adaptors, as proposed in [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0429r1.pdf P0429R1].
1461  The allocator argument is checked for ['size()] and ['empty()] members. If so, the argument is interpreted as the required underlying container.
1462  This means that ['static_vector], ['stable_vector] and ['small_vector] can be used now with flat associative containers.
1463
1464* Fixed bugs:
1465   * [@https://github.com/boostorg/container/pull/54 GitHub #54: ['"no sbrk() in VxWorks, configure dlmalloc to use only mmap"]].
1466   * [@https://github.com/boostorg/container/issues/58 GitHub #58: ['"Comparing strings does not compile in gcc 7+ in C++17 mode"]].
1467   * [@https://github.com/boostorg/container/issues/59 GitHub #59: ['"basic_string::npos is missing its definition"]].
1468
1469[endsect]
1470
1471[section:release_notes_boost_1_65_00 Boost 1.65 Release]
1472
1473* Implemented `extract_sequence`, `adopt_sequence` functions for flat_[multi]map/set associative containers.
1474
1475* Fixed bugs:
1476   * [@https://github.com/boostorg/container/pull/48 GitHub #48: ['"Replace deprecated/removed C++98 binders"]].
1477   * [@https://github.com/boostorg/container/pull/49 GitHub #49: ['"Remove useless allocator copy in map"]].
1478   * [@https://github.com/boostorg/container/pull/50 GitHub #50: ['"Fixed bug Trac #13038"]].
1479   * [@https://github.com/boostorg/container/pull/51 GitHub #51: ['"Fix integer rollover that triggers clang ubsan when U is unsigned"]].
1480
1481[endsect]
1482
1483[section:release_notes_boost_1_64_00 Boost 1.64 Release]
1484
1485* Fixed bugs:
1486   * [@https://svn.boost.org/trac/boost/ticket/11333 Trac #11333: ['"boost::basic_string_ref should interop with boost::container::basic_string"]].
1487   * [@https://svn.boost.org/trac/boost/ticket/12749 Trac #12749: ['"container::pmr::polymorphic_allocator compilation error"]].
1488   * [@https://svn.boost.org/trac/boost/ticket/12915 Trac #12915: ['"Buffer overflow in boost::container::vector (affects flat_set)"]].
1489   * [@https://github.com/boostorg/container/pull/45 GitHub #45: ['"emplace_back must return reference to back(), not to *end()"]].
1490   * [@https://github.com/boostorg/container/pull/46 GitHub #46: ['"Fix use of propagate_on_container_swap"]].
1491
1492[endsect]
1493
1494[section:release_notes_boost_1_63_00 Boost 1.63 Release]
1495
1496* Fixed bugs:
1497   * [@https://svn.boost.org/trac/boost/ticket/12534 Trac #12534: ['"flat_map fails to compile if included after type_traits is instantiated under gcc"]].
1498   * [@https://svn.boost.org/trac/boost/ticket/12577 Trac #12577: ['"Null reference in pair.hpp triggers runtime warning with -fsanitize=undefined"]].
1499   * [@https://github.com/boostorg/container/pull/41 GitHub #40: ['Fix parameter types in copy_move_algo.hpp: iterator_traits::difference_type -> allocator_traits::size_type]].
1500   * [@https://github.com/boostorg/container/pull/41 GitHub #41: ['Avoid -Wunreachable-code in do_allocate()]].
1501
1502[endsect]
1503
1504[section:release_notes_boost_1_62_00 Boost 1.62 Release]
1505
1506* Fixed bugs:
1507   * [@https://svn.boost.org/trac/boost/ticket/9481  Trac #9481:  ['"Minor comment typo in Boost.Container"]].
1508   * [@https://svn.boost.org/trac/boost/ticket/9689  Trac #9689:  ['"Add piecewise_construct to boost::container"]].
1509   * [@https://svn.boost.org/trac/boost/ticket/11170 Trac #11170: ['"Doc slip for index_of"]].
1510   * [@https://svn.boost.org/trac/boost/ticket/11802 Trac #11802: ['"Incorrect ordering after using insert() with ordered_range_t on a flat_multiset with a non-default sort order"]].
1511   * [@https://svn.boost.org/trac/boost/ticket/12117 Trac #12117: ['"flat_set constructor with ordered_unique_range"]].
1512   * [@https://svn.boost.org/trac/boost/ticket/12177 Trac #12177: ['"vector::priv_merge uses unqualified uintptr_t"]].
1513   * [@https://svn.boost.org/trac/boost/ticket/12183 Trac #12183: ['"GCC 6.1 thinks boost::container::string violates strict aliasing"]].
1514   * [@https://svn.boost.org/trac/boost/ticket/12256 Trac #12256: ['"set<std::pair<int,int>>::insert cause compilation error in debug configuration in Visual Studio 2012"]].
1515   * [@https://svn.boost.org/trac/boost/ticket/12273 Trac #12273: ['"static_vector max_size() and capacity() should be constant expressions"]].
1516     Added constant `static_vector<>::static_capacity` to use the configured capacity in constant expressions.
1517   * [@https://svn.boost.org/trac/boost/ticket/12286 Trac #12286: ['"PMR flat_map from Boost Container does not compile"]].
1518   * [@https://svn.boost.org/trac/boost/ticket/12296 Trac #12296: ['"{deque,string} combine for a memory leak"]].
1519   * [@https://svn.boost.org/trac/boost/ticket/12319 Trac #12319: ['"flat_set` should be nothrow move constructible"]].
1520
1521* Revised noexcept expressions of default and move constructors in all containers.
1522* Implemented C++17's `insert_or_assign`/`try_emplace` for [classref boost::container::map map] and [classref boost::container::flat_map flat_map].
1523* Implemented C++17's [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0083r3.pdf ['Splicing Maps and Sets (Revision 5)]]
1524   for [classref boost::container::map map], [classref boost::container::multimap multimap],
1525   [classref boost::container::set set], [classref boost::container::multiset multiset].
1526* Implemented C++17's [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0084r2.pdf ['P0084R2 Emplace Return Type]]
1527  in `deque`, `vector`, `stable_vector`, `small_vector`, `static_vector`, `list` and `slist`.
1528
1529[endsect]
1530
1531[section:release_notes_boost_1_61_00 Boost 1.61 Release]
1532
1533* [classref boost::container::small_vector] supports more constructors and assignments.
1534* Fixed bugs:
1535   * [@https://svn.boost.org/trac/boost/ticket/11820 Trac #11820: ['"compiler error when using operator[] of map"]].
1536   * [@https://svn.boost.org/trac/boost/ticket/11856 Trac #11856: ['"pool_resource.cpp error: declaration changes meaning"]].
1537   * [@https://svn.boost.org/trac/boost/ticket/11866 Trac #11866: ['"small_vector does not have range constructor"]].
1538   * [@https://svn.boost.org/trac/boost/ticket/11867 Trac #11867: ['"small_vector should have constructor and assignment operator taking other small_vector"]].
1539   * [@https://svn.boost.org/trac/boost/ticket/11912 Trac #11912: ['"flat_map use of vector::priv_forward_range_insert_expand_backwards may cause move with same source"]].
1540   * [@https://svn.boost.org/trac/boost/ticket/11957 Trac #11957: ['"static_vector::max_size() is higher than the capacity"]].
1541   * [@https://svn.boost.org/trac/boost/ticket/12014 Trac #12014: ['"boost::container::set can not insert const (ref) range"]].
1542   * [@https://github.com/boostorg/container/pull/33 GitHub #33: ['Make sure std::string constructor is available]].
1543
1544[endsect]
1545
1546[section:release_notes_boost_1_60_00 Boost 1.60 Release]
1547
1548* Implemented [link container.cpp_conformance.polymorphic_memory_resources Polymorphic Memory Resources].
1549* Add more BOOST_ASSERT checks to test preconditions in some operations (like `pop_back`, `pop_front`, `back`, `front`, etc.)
1550* Added C++11 `back`/`front` operations to [classref boost::container::basic_string basic_string].
1551* Fixed bugs:
1552   * [@https://svn.boost.org/trac/boost/ticket/11627 Trac #11627: ['"small_vector<T,n>::swap() appears to be broken"]].
1553   * [@https://svn.boost.org/trac/boost/ticket/11628 Trac #11628: ['"small_vector<int,n> iterates over elements in destructor"]].
1554   * [@https://svn.boost.org/trac/boost/ticket/11697 Trac #11697: ['"Wrong initialization order in tuple copy-constructor"]].
1555   * [@https://svn.boost.org/trac/boost/ticket/11698 Trac #11698: ['"Missing return statement in static_storage_allocator"]].
1556   * [@https://github.com/boostorg/container/pull/29 GitHub #29: ['Doc fixes for flap_map complexity requirements]].
1557   * [@https://github.com/boostorg/container/pull/31 GitHub #31: ['DL_SIZE_IMPL also dereference addr]].
1558
1559[endsect]
1560
1561[section:release_notes_boost_1_59_00 Boost 1.59 Release]
1562
1563* [@https://github.com/boostorg/container/pull/26 GitHub #26: ['Fix bug in stable_vector::capacity()]]. Thanks to timsong-cpp/Arindam Mukerjee.
1564* [@https://github.com/boostorg/container/pull/27 GitHub #27: ['fix stable_vector's index_of's doxygen comment]]. Thanks to kariya-mitsuru.
1565* [@https://svn.boost.org/trac/boost/ticket/11380 Trac #11380: ['"Container library std forward declarations incorrect in std_fwd.hpp on libc++ with gcc"]].
1566* [@https://svn.boost.org/trac/boost/ticket/11388 Trac #11388: ['"boost::container::list::emplace_back broken on Visual Studio 2010"]].
1567* [@https://svn.boost.org/trac/boost/ticket/11339 Trac #11339: ['"VC12 LNK2005 error with boost::container::adaptive_pool"]].
1568
1569[endsect]
1570
1571[section:release_notes_boost_1_58_00 Boost 1.58 Release]
1572*  Experimental [classref boost::container::small_vector small_vector] container.
1573*  Massive dependency reorganization. Now [*Boost.Container] depends on very basic utilities like Boost.Core
1574   and [*Boost.Intrusive]. Preprocessed code size have decreased considerably and compilation times have improved.
1575*  Added `nth` and `index_of` functions to containers with random-access iterators (except `basic_string`).
1576*  Added C++17's `allocator_traits<Allocator>::is_always_equal`.
1577*  Updated containers to implement new constructors as specified in
1578   [@http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2210 2210. Missing allocator-extended constructor for allocator-aware containers].
1579*  Fixed bugs:
1580   * [@https://svn.boost.org/trac/boost/ticket/9931  Trac #9931: ['"flat_map::insert(ordered_unique_range_t...) fails with move_iterators"]] (reopened).
1581   * [@https://svn.boost.org/trac/boost/ticket/11076 Trac #11076: ['"Unqualified calls to memmove/memcpy in container/detail/copy_move_algo.hpp"]].
1582   * [@https://svn.boost.org/trac/boost/ticket/10790 Trac #10790 (['"long long errors from container"])].
1583   * [@https://svn.boost.org/trac/boost/ticket/10808 Trac #10808 (['"compare equal operator of vector is broken"])].
1584   * [@https://svn.boost.org/trac/boost/ticket/10930 Trac #10930 (['"container std_fwd.hpp neglects custom std namespaces"])].
1585   * [@https://svn.boost.org/trac/boost/ticket/11139 Trac #11139 (['"boost::container::vector<std::shared_ptr<const T>...>::const_iterator allows changing dereferenced elements"])].
1586* [*Source Breaking]: [classref boost::container::scoped_allocator_adaptor scoped_allocator_adaptor]'s
1587   `propagate_on_container_copy_assignment`, `propagate_on_container_move_assignment` and `propagate_on_container_swap`
1588   are no longer `::boost::integral_constant<bool, true/false>` types. The dependency reorganization needed to break
1589   with those classes to avoid MPL dependencies, and interoperability with `std::integral_constant` was not guaranteed.
1590   Code assumming `boost::true_type/boost::false_type` on this will not compile. As a workaround, use the guaranteed internal
1591   `::value` constant: `::boost::integral_constant<bool, scoped_allocator_adaptor<Allocator>::propagate_on_container_move_assignment::value>`.
1592
1593[endsect]
1594
1595[section:release_notes_boost_1_57_00 Boost 1.57 Release]
1596*  Added support for `initializer_list`. Contributed by Robert Matusewicz.
1597*  Fixed double destruction bugs in vector and backward expansion capable allocators.
1598*  Fixed bugs:
1599   * [@https://svn.boost.org/trac/boost/ticket/10263 Trac #10263 (['"AIX 6.1 bug with sched_yield() function out of scope"])].
1600   * [@https://github.com/boostorg/container/pull/16 GitHub #16: ['Fix iterators of incomplete type containers]]. Thanks to Mikael Persson.
1601
1602[endsect]
1603
1604[section:release_notes_boost_1_56_00 Boost 1.56 Release]
1605
1606* Added DlMalloc-based [link container.extended_allocators Extended Allocators].
1607
1608* [link container.configurable_containers.configurable_tree_based_associative_containers Improved configurability]
1609   of tree-based ordered associative containers. AVL, Scapegoat and Splay trees are now available
1610   to implement [classref boost::container::set set], [classref boost::container::multiset multiset],
1611   [classref boost::container::map map] and [classref boost::container::multimap multimap].
1612
1613* Fixed bugs:
1614   *  [@https://svn.boost.org/trac/boost/ticket/9338 #9338: ['"VS2005 compiler errors in swap() definition after including container/memory_util.hpp"]].
1615   *  [@https://svn.boost.org/trac/boost/ticket/9637 #9637: ['"Boost.Container vector::resize() performance issue"]].
1616   *  [@https://svn.boost.org/trac/boost/ticket/9648 #9648: ['"string construction optimization - char_traits::copy could be used ..."]].
1617   *  [@https://svn.boost.org/trac/boost/ticket/9801 #9801: ['"I can no longer create and iterator_range from a stable_vector"]].
1618   *  [@https://svn.boost.org/trac/boost/ticket/9915 #9915: ['"Documentation issues regarding vector constructors and resize methods - value/default initialization"]].
1619   *  [@https://svn.boost.org/trac/boost/ticket/9916 #9916: ['"Allocator propagation incorrect in the assignment operator of most"]].
1620   *  [@https://svn.boost.org/trac/boost/ticket/9931 #9931: ['"flat_map::insert(ordered_unique_range_t...) fails with move_iterators"]].
1621   *  [@https://svn.boost.org/trac/boost/ticket/9955 #9955: ['"Using memcpy with overlapped buffers in vector"]].
1622
1623[endsect]
1624
1625[section:release_notes_boost_1_55_00 Boost 1.55 Release]
1626
1627*  Implemented [link container.main_features.scary_iterators SCARY iterators].
1628
1629*  Fixed bugs [@https://svn.boost.org/trac/boost/ticket/8269 #8269],
1630              [@https://svn.boost.org/trac/boost/ticket/8473 #8473],
1631              [@https://svn.boost.org/trac/boost/ticket/8892 #8892],
1632              [@https://svn.boost.org/trac/boost/ticket/9009 #9009],
1633              [@https://svn.boost.org/trac/boost/ticket/9064 #9064],
1634              [@https://svn.boost.org/trac/boost/ticket/9092 #9092],
1635              [@https://svn.boost.org/trac/boost/ticket/9108 #9108],
1636              [@https://svn.boost.org/trac/boost/ticket/9166 #9166].
1637
1638* Added `default initialization` insertion functions to vector-like containers
1639   with new overloads taking `default_init_t` as an argument instead of `const value_type &`.
1640
1641[endsect]
1642
1643[section:release_notes_boost_1_54_00 Boost 1.54 Release]
1644
1645*  Added experimental `static_vector` class, based on Andrew Hundt's and Adam Wulkiewicz's
1646   high performance `varray` class.
1647*  Speed improvements in `vector` constructors/copy/move/swap, dispatching to memcpy when possible.
1648*  Support for `BOOST_NO_EXCEPTIONS` [@https://svn.boost.org/trac/boost/ticket/7227 #7227].
1649*  Fixed bugs [@https://svn.boost.org/trac/boost/ticket/7921 #7921],
1650              [@https://svn.boost.org/trac/boost/ticket/7969 #7969],
1651              [@https://svn.boost.org/trac/boost/ticket/8118 #8118],
1652              [@https://svn.boost.org/trac/boost/ticket/8294 #8294],
1653              [@https://svn.boost.org/trac/boost/ticket/8553 #8553],
1654              [@https://svn.boost.org/trac/boost/ticket/8724 #8724].
1655
1656[endsect]
1657
1658[section:release_notes_boost_1_53_00 Boost 1.53 Release]
1659
1660*  Fixed bug [@https://svn.boost.org/trac/boost/ticket/7650 #7650].
1661*  Improved `vector`'s insertion performance.
1662*  Changed again experimental multiallocation interface for better performance (still experimental).
1663*  Added no exception support for those willing to disable exceptions in their compilers.
1664*  Fixed GCC -Wshadow warnings.
1665*  Replaced deprecated BOOST_NO_XXXX with newer BOOST_NO_CXX11_XXX macros.
1666
1667[endsect]
1668
1669[section:release_notes_boost_1_52_00 Boost 1.52 Release]
1670
1671*  Improved `stable_vector`'s template code bloat and type safety.
1672*  Changed typedefs and reordered functions of sequence containers to improve doxygen documentation.
1673*  Fixed bugs
1674  [@https://svn.boost.org/trac/boost/ticket/6615 #6615],
1675  [@https://svn.boost.org/trac/boost/ticket/7139 #7139],
1676  [@https://svn.boost.org/trac/boost/ticket/7215 #7215],
1677  [@https://svn.boost.org/trac/boost/ticket/7232 #7232],
1678  [@https://svn.boost.org/trac/boost/ticket/7269 #7269],
1679  [@https://svn.boost.org/trac/boost/ticket/7439 #7439].
1680*  Implemented LWG Issue #149 (range insertion now returns an iterator) & cleaned up insertion code in most containers
1681*  Corrected aliasing errors.
1682
1683[endsect]
1684
1685[section:release_notes_boost_1_51_00 Boost 1.51 Release]
1686
1687*  Fixed bugs
1688  [@https://svn.boost.org/trac/boost/ticket/6763 #6763],
1689  [@https://svn.boost.org/trac/boost/ticket/6803 #6803],
1690  [@https://svn.boost.org/trac/boost/ticket/7114 #7114],
1691  [@https://svn.boost.org/trac/boost/ticket/7103 #7103].
1692  [@https://svn.boost.org/trac/boost/ticket/7123 #7123],
1693
1694[endsect]
1695
1696[section:release_notes_boost_1_50_00 Boost 1.50 Release]
1697
1698*  Added Scoped Allocator Model support.
1699
1700*  Fixed bugs
1701  [@https://svn.boost.org/trac/boost/ticket/6606 #6606],
1702  [@https://svn.boost.org/trac/boost/ticket/6533 #6533],
1703  [@https://svn.boost.org/trac/boost/ticket/6536 #6536],
1704  [@https://svn.boost.org/trac/boost/ticket/6566 #6566],
1705  [@https://svn.boost.org/trac/boost/ticket/6575 #6575],
1706
1707[endsect]
1708
1709
1710[section:release_notes_boost_1_49_00 Boost 1.49 Release]
1711
1712*  Fixed bugs
1713  [@https://svn.boost.org/trac/boost/ticket/6540 #6540],
1714  [@https://svn.boost.org/trac/boost/ticket/6499 #6499],
1715  [@https://svn.boost.org/trac/boost/ticket/6336 #6336],
1716  [@https://svn.boost.org/trac/boost/ticket/6335 #6335],
1717  [@https://svn.boost.org/trac/boost/ticket/6287 #6287],
1718  [@https://svn.boost.org/trac/boost/ticket/6205 #6205],
1719  [@https://svn.boost.org/trac/boost/ticket/4383 #4383].
1720
1721*  Added `allocator_traits` support for both C++11 and C++03
1722   compilers through an internal `allocator_traits` clone.
1723
1724[endsect]
1725
1726[section:release_notes_boost_1_48_00 Boost 1.48 Release]
1727
1728*  First release. Container code from [*Boost.Interprocess] was deleted
1729   and redirected to [*Boost.Container ] via using directives.
1730
1731[endsect]
1732
1733[endsect]
1734