Commit e1444d8f by Lawrence Wolf-Sonkin Committed by Copybara-Service

Update `FixedArray` doc comments to match actual template param names

* The template parameter provided to `FixedArray` for the number of inline elements is named `N`
* If left defaulted, which is recommended, `FixedArray` chooses the number of inline elements by itself
* The `inline_elements` static class member contains the actual number of inlinable elements
* Previously the docs referred to the template parameter as `inline_elements` instead of `N`.

PiperOrigin-RevId: 497185546
Change-Id: I321092826d956704c0074062d2a7b924b28e36d0
parent 8e6582b8
...@@ -62,11 +62,10 @@ constexpr static auto kFixedArrayUseDefault = static_cast<size_t>(-1); ...@@ -62,11 +62,10 @@ constexpr static auto kFixedArrayUseDefault = static_cast<size_t>(-1);
// A `FixedArray` provides a run-time fixed-size array, allocating a small array // A `FixedArray` provides a run-time fixed-size array, allocating a small array
// inline for efficiency. // inline for efficiency.
// //
// Most users should not specify an `inline_elements` argument and let // Most users should not specify the `N` template parameter and let `FixedArray`
// `FixedArray` automatically determine the number of elements // automatically determine the number of elements to store inline based on
// to store inline based on `sizeof(T)`. If `inline_elements` is specified, the // `sizeof(T)`. If `N` is specified, the `FixedArray` implementation will use
// `FixedArray` implementation will use inline storage for arrays with a // inline storage for arrays with a length <= `N`.
// length <= `inline_elements`.
// //
// Note that a `FixedArray` constructed with a `size_type` argument will // Note that a `FixedArray` constructed with a `size_type` argument will
// default-initialize its values by leaving trivially constructible types // default-initialize its values by leaving trivially constructible types
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment