From e1444d8f5f3d9147445155dde9a93f0070407afe Mon Sep 17 00:00:00 2001 From: Lawrence Wolf-Sonkin Date: Thu, 22 Dec 2022 09:49:55 -0800 Subject: 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 --- absl/container/fixed_array.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'absl/container') diff --git a/absl/container/fixed_array.h b/absl/container/fixed_array.h index 55432430..b67379cf 100644 --- a/absl/container/fixed_array.h +++ b/absl/container/fixed_array.h @@ -62,11 +62,10 @@ constexpr static auto kFixedArrayUseDefault = static_cast(-1); // A `FixedArray` provides a run-time fixed-size array, allocating a small array // inline for efficiency. // -// Most users should not specify an `inline_elements` argument and let -// `FixedArray` automatically determine the number of elements -// to store inline based on `sizeof(T)`. If `inline_elements` is specified, the -// `FixedArray` implementation will use inline storage for arrays with a -// length <= `inline_elements`. +// Most users should not specify the `N` template parameter and let `FixedArray` +// automatically determine the number of elements to store inline based on +// `sizeof(T)`. If `N` is specified, the `FixedArray` implementation will use +// inline storage for arrays with a length <= `N`. // // Note that a `FixedArray` constructed with a `size_type` argument will // default-initialize its values by leaving trivially constructible types -- cgit v1.2.3