inlined_vector: Use trivial relocation for SwapInlinedElements#1618
inlined_vector: Use trivial relocation for SwapInlinedElements#1618Quuxplusone wants to merge 1 commit intoabseil:masterfrom
SwapInlinedElements#1618Conversation
2a91941 to
567a1dd
Compare
|
Going to try to import this now. I don't expect any issues. |
|
Awesome, 92c8575 LGTM! notice that we definitely don't want to use a trivially copyable struct, because that wouldn't sufficiently test the behavior we're trying to test. I assume the tests in the |
A code reviewer suggested that comment, but you are correct. Maybe it would be better to |
…edElements` Imported from GitHub PR abseil#1618 I noticed while working on abseil#1615 that `inlined_vector` could use the trivial relocatability trait here, too. Here the memcpy codepath already exists; we just have to opt in to using it. Merge 567a1dd into a7012a5 Merging this change closes abseil#1618 COPYBARA_INTEGRATE_REVIEW=abseil#1618 from Quuxplusone:trivial-swap 567a1dd PiperOrigin-RevId: 609019296 Change-Id: I4055ab790245752179e405b490fcd479e7389726
I noticed while working on #1615 that
inlined_vectorcould use the trivial relocatability trait here, too.Here the memcpy codepath already exists; we just have to opt in to using it.