@@ -322,14 +322,13 @@ class Storage {
322322
323323 // The policy to be used specifically when swapping inlined elements.
324324 using SwapInlinedElementsPolicy = absl::conditional_t <
325- // Fast path: if the value type can be trivially move constructed/assigned
326- // and destroyed, and we know the allocator doesn't do anything fancy,
327- // then it's safe for us to simply swap the bytes in the inline storage.
328- // It's as if we had move-constructed a temporary vector, move-assigned
329- // one to the other, then move-assigned the first from the temporary.
330- absl::conjunction<absl::is_trivially_move_constructible<ValueType<A>>,
331- absl::is_trivially_move_assignable<ValueType<A>>,
332- absl::is_trivially_destructible<ValueType<A>>,
325+ // Fast path: if the value type can be trivially relocated, and we
326+ // know the allocator doesn't do anything fancy, then it's safe for us
327+ // to simply swap the bytes in the inline storage. It's as if we had
328+ // relocated the first vector's elements into temporary storage,
329+ // relocated the second's elements into the (now-empty) first's,
330+ // and then relocated from temporary storage into the second.
331+ absl::conjunction<absl::is_trivially_relocatable<ValueType<A>>,
333332 std::is_same<A, std::allocator<ValueType<A>>>>::value,
334333 MemcpyPolicy,
335334 absl::conditional_t <IsSwapOk<A>::value, ElementwiseSwapPolicy,
@@ -624,8 +623,8 @@ void Storage<T, N, A>::InitFrom(const Storage& other) {
624623
625624template <typename T, size_t N, typename A>
626625template <typename ValueAdapter>
627- auto Storage<T, N, A>::Initialize(ValueAdapter values, SizeType<A> new_size)
628- -> void {
626+ auto Storage<T, N, A>::Initialize(ValueAdapter values,
627+ SizeType<A> new_size) -> void {
629628 // Only callable from constructors!
630629 ABSL_HARDENING_ASSERT (!GetIsAllocated ());
631630 ABSL_HARDENING_ASSERT (GetSize () == 0 );
@@ -656,8 +655,8 @@ auto Storage<T, N, A>::Initialize(ValueAdapter values, SizeType<A> new_size)
656655
657656template <typename T, size_t N, typename A>
658657template <typename ValueAdapter>
659- auto Storage<T, N, A>::Assign(ValueAdapter values, SizeType<A> new_size)
660- -> void {
658+ auto Storage<T, N, A>::Assign(ValueAdapter values,
659+ SizeType<A> new_size) -> void {
661660 StorageView<A> storage_view = MakeStorageView ();
662661
663662 AllocationTransaction<A> allocation_tx (GetAllocator ());
@@ -699,8 +698,8 @@ auto Storage<T, N, A>::Assign(ValueAdapter values, SizeType<A> new_size)
699698
700699template <typename T, size_t N, typename A>
701700template <typename ValueAdapter>
702- auto Storage<T, N, A>::Resize(ValueAdapter values, SizeType<A> new_size)
703- -> void {
701+ auto Storage<T, N, A>::Resize(ValueAdapter values,
702+ SizeType<A> new_size) -> void {
704703 StorageView<A> storage_view = MakeStorageView ();
705704 Pointer<A> const base = storage_view.data ;
706705 const SizeType<A> size = storage_view.size ;
@@ -885,8 +884,8 @@ auto Storage<T, N, A>::EmplaceBackSlow(Args&&... args) -> Reference<A> {
885884}
886885
887886template <typename T, size_t N, typename A>
888- auto Storage<T, N, A>::Erase(ConstIterator<A> from, ConstIterator<A> to)
889- -> Iterator<A> {
887+ auto Storage<T, N, A>::Erase(ConstIterator<A> from,
888+ ConstIterator<A> to) -> Iterator<A> {
890889 StorageView<A> storage_view = MakeStorageView ();
891890
892891 auto erase_size = static_cast <SizeType<A>>(std::distance (from, to));
0 commit comments