diff options
author | Abseil Team <absl-team@google.com> | 2021-11-03 08:46:25 -0700 |
---|---|---|
committer | vslashg <gfalcon@google.com> | 2021-11-03 21:41:31 -0400 |
commit | d6c75d9dd895922bf5dc6c38245ac8887d3e68fc (patch) | |
tree | 8d44ea00a51f2614c755c2efe4aff4ac731e81b6 /absl/container/inlined_vector.h | |
parent | 3b22e57740b8aec4920c4cfd76b78b3a4fcb2bb5 (diff) |
Export of internal Abseil changes
--
9f6ef337f282272bc098330c9ccacd9d39155db4 by Abseil Team <absl-team@google.com>:
Make DestroyElements an empty function if the value types are trivially deconstructible.
PiperOrigin-RevId: 407345743
--
a639bbf6f22446d6ba3da9e2c205e26cda4bebc5 by Derek Mauro <dmauro@google.com>:
Add ctest --output-on-failure to the CMake install test
PiperOrigin-RevId: 407333671
--
54d0577fa6ba1159c6a86410ae185c52f4afaff6 by Derek Mauro <dmauro@google.com>:
Fix Android build of elf_mem_image.cc
PiperOrigin-RevId: 407331032
GitOrigin-RevId: 9f6ef337f282272bc098330c9ccacd9d39155db4
Change-Id: I7e13f01cd804aec50f280ac25934c9ec48ef3c5f
Diffstat (limited to 'absl/container/inlined_vector.h')
-rw-r--r-- | absl/container/inlined_vector.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/absl/container/inlined_vector.h b/absl/container/inlined_vector.h index df9e0991..318c4679 100644 --- a/absl/container/inlined_vector.h +++ b/absl/container/inlined_vector.h @@ -233,8 +233,8 @@ class InlinedVector { // specified allocator is also `noexcept`. InlinedVector( InlinedVector&& other, - const allocator_type& allocator) - noexcept(absl::allocator_is_nothrow<allocator_type>::value) + const allocator_type& + allocator) noexcept(absl::allocator_is_nothrow<allocator_type>::value) : storage_(allocator) { if (IsMemcpyOk<A>::value) { storage_.MemcpyFrom(other.storage_); @@ -486,8 +486,8 @@ class InlinedVector { InlinedVector& operator=(InlinedVector&& other) { if (ABSL_PREDICT_TRUE(this != std::addressof(other))) { if (IsMemcpyOk<A>::value || other.storage_.GetIsAllocated()) { - inlined_vector_internal::DestroyElements<A>(storage_.GetAllocator(), - data(), size()); + inlined_vector_internal::DestroyAdapter<A>::DestroyElements( + storage_.GetAllocator(), data(), size()); storage_.DeallocateIfAllocated(); storage_.MemcpyFrom(other.storage_); @@ -721,8 +721,8 @@ class InlinedVector { // Destroys all elements in the inlined vector, setting the size to `0` and // deallocating any held memory. void clear() noexcept { - inlined_vector_internal::DestroyElements<A>(storage_.GetAllocator(), data(), - size()); + inlined_vector_internal::DestroyAdapter<A>::DestroyElements( + storage_.GetAllocator(), data(), size()); storage_.DeallocateIfAllocated(); storage_.SetInlinedSize(0); |