mirror of
https://github.com/boostorg/container.git
synced 2026-01-19 04:02:17 +00:00
Added stored_size option to static_vector
This commit is contained in:
@@ -770,6 +770,12 @@ the last template parameter and defined using the utility class
|
||||
of objects. When "false", if the capacit is overflowed, the implementation calls to BOOST_ASSERT and if that assertion
|
||||
does not throw or abort, undefined behavior is triggered.
|
||||
|
||||
* [classref boost::container::stored_size stored_size]: the type that will be used to store size-related
|
||||
parameters inside of the vector. Sometimes, when the static to be used is much less than `std::size_t`
|
||||
it's interesting to use a smaller unsigned integer types to represent `size()` inside `static_vector``,
|
||||
so that the size of an empty vector is minimized and cache
|
||||
performance might be improved. See [classref boost::container::stored_size stored_size] for more details.
|
||||
|
||||
See the following example to see how [classref boost::container::static_vector_options static_vector_options] can be
|
||||
used to customize `static_vector`:
|
||||
|
||||
@@ -1411,6 +1417,8 @@ use [*Boost.Container]? There are several reasons for that:
|
||||
|
||||
[section:release_notes_boost_1_87_00 Boost 1.87 Release]
|
||||
|
||||
* Added [classref boost::container::stored_size stored_size] option to [classref boost::container::static_vector static_vector].
|
||||
|
||||
* Fixed bugs/issues:
|
||||
* [@https://github.com/boostorg/container/issues/261 GitHub #261: ['"End iterators are not dereferencable"]].
|
||||
* [@https://github.com/boostorg/container/issues/288 GitHub #288: ['"Compile error when using flat_map::extract_sequence with small_vector"]].
|
||||
|
||||
Reference in New Issue
Block a user