From cdad769e24a892590a86caa9b6558da0f754140d Mon Sep 17 00:00:00 2001 From: William Throwe Date: Wed, 25 May 2022 14:00:44 -0400 Subject: [PATCH 1/2] Fix documentation directive typo --- include/boost/container/small_vector.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/container/small_vector.hpp b/include/boost/container/small_vector.hpp index 088d51d1..f80e6e92 100644 --- a/include/boost/container/small_vector.hpp +++ b/include/boost/container/small_vector.hpp @@ -545,7 +545,7 @@ struct small_vector_storage_definer //! \tparam N The number of preallocated elements stored inside small_vector. It shall be less than Allocator::max_size(); //! \tparam Allocator The allocator used for memory management when the number of elements exceeds N. Use void //! for the default allocator -//! |tparam Options A type produced from \c boost::container::small_vector_options. +//! \tparam Options A type produced from \c boost::container::small_vector_options. template class small_vector : public small_vector_base #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED From 780372bc7958934c431de0233b19b85067f20b3d Mon Sep 17 00:00:00 2001 From: William Throwe Date: Wed, 25 May 2022 14:20:41 -0400 Subject: [PATCH 2/2] Document small_vector allocation strategy --- include/boost/container/small_vector.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/boost/container/small_vector.hpp b/include/boost/container/small_vector.hpp index f80e6e92..a3fb4a62 100644 --- a/include/boost/container/small_vector.hpp +++ b/include/boost/container/small_vector.hpp @@ -541,6 +541,9 @@ struct small_vector_storage_definer //! //! All `boost::container::vector` member functions are inherited. See `vector` documentation for details. //! +//! Any change to the capacity of the vector, including decreasing its size such as with the shrink_to_fit method, will +//! cause the vector to permanently switch to dynamically allocated storage. +//! //! \tparam T The type of object that is stored in the small_vector //! \tparam N The number of preallocated elements stored inside small_vector. It shall be less than Allocator::max_size(); //! \tparam Allocator The allocator used for memory management when the number of elements exceeds N. Use void