Export of internal Abseil changes.

--
bbb50c2e52241f0a5f8478bac89e6523ec8fd664 by CJ Johnson <johnsoncj@google.com>:

The two InlinedVector copy constructors have identical definitions. This CL simply defines one in terms of the other

PiperOrigin-RevId: 224734857
GitOrigin-RevId: bbb50c2e52241f0a5f8478bac89e6523ec8fd664
Change-Id: I617c239fd4f16fde0aa10a15fdac58a0cfd10f8a
This commit is contained in:
Abseil Team 2018-12-09 14:25:52 -08:00 committed by jueminyang
parent f197d7c72a
commit 455dc17ba1

View file

@ -149,16 +149,7 @@ class InlinedVector {
// Creates a copy of `other` using `other`'s allocator.
InlinedVector(const InlinedVector& other)
: allocator_and_tag_(other.allocator()) {
reserve(other.size());
if (allocated()) {
UninitializedCopy(other.begin(), other.end(), allocated_space());
tag().set_allocated_size(other.size());
} else {
UninitializedCopy(other.begin(), other.end(), inlined_space());
tag().set_inline_size(other.size());
}
}
: InlinedVector(other, other.allocator()) {}
// Creates a copy of `other` but with a specified allocator.
InlinedVector(const InlinedVector& other, const allocator_type& alloc)