diff options
author | Benjamin Barenblat <bbaren@google.com> | 2023-05-08 12:51:08 -0400 |
---|---|---|
committer | Benjamin Barenblat <bbaren@google.com> | 2023-05-08 12:51:08 -0400 |
commit | c15cec707b1c7d847e59d2db4d0b82b711a7ee6d (patch) | |
tree | 79f448d5bbc8cf52917b0b091f0e1ab60a419c85 /absl/container/fixed_array.h | |
parent | f4f2c1da90c4e6a0683c4e66c0268baa1b79cdf3 (diff) | |
parent | c2435f8342c2d0ed8101cb43adfd605fdc52dca2 (diff) | |
download | abseil-c15cec707b1c7d847e59d2db4d0b82b711a7ee6d.tar.gz abseil-c15cec707b1c7d847e59d2db4d0b82b711a7ee6d.tar.bz2 abseil-c15cec707b1c7d847e59d2db4d0b82b711a7ee6d.zip |
Merge new upstream LTS 20230125.3
Diffstat (limited to 'absl/container/fixed_array.h')
-rw-r--r-- | absl/container/fixed_array.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/absl/container/fixed_array.h b/absl/container/fixed_array.h index 2aefae3b..b67379cf 100644 --- a/absl/container/fixed_array.h +++ b/absl/container/fixed_array.h @@ -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 // 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 @@ -471,6 +470,9 @@ class FixedArray { return n <= inline_elements; } +#ifdef ABSL_HAVE_ADDRESS_SANITIZER + ABSL_ATTRIBUTE_NOINLINE +#endif // ABSL_HAVE_ADDRESS_SANITIZER StorageElement* InitializeData() { if (UsingInlinedStorage(size())) { InlinedStorage::AnnotateConstruct(size()); |