[SmallVector] Copy new docs into Doxygen comment

Copy the `ProgrammersManual.rst` changes from D92522 to the Doxygen
comment for `SmallVector`, to hopefully encourage new uses migrating to
the no-explicit-`N` form.

Differential Revision: https://reviews.llvm.org/D93069
This commit is contained in:
Scott Linder 2020-12-10 21:54:15 +00:00
parent 186c154991
commit 10b5eaed91
1 changed files with 8 additions and 1 deletions

View File

@ -1012,7 +1012,14 @@ template <typename T> struct CalculateSmallVectorDefaultInlinedElements {
/// elements is below that threshold. This allows normal "small" cases to be
/// fast without losing generality for large inputs.
///
/// Note that this does not attempt to be exception safe.
/// \note
/// In the absence of a well-motivated choice for the number of inlined
/// elements \p N, it is recommended to use \c SmallVector<T> (that is,
/// omitting the \p N). This will choose a default number of inlined elements
/// reasonable for allocation on the stack (for example, trying to keep \c
/// sizeof(SmallVector<T>) around 64 bytes).
///
/// \warning This does not attempt to be exception safe.
///
template <typename T,
unsigned N = CalculateSmallVectorDefaultInlinedElements<T>::value>