You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
libcxx_old/test/std/containers/sequences/vector
Tom Stellard 598ae4fa2e Merging r315994:
------------------------------------------------------------------------
r315994 | ericwf | 2017-10-17 06:03:17 -0700 (Tue, 17 Oct 2017) | 18 lines

[libc++] Fix PR34898 - vector iterator constructors and assign method perform push_back instead of emplace_back.

Summary:
The constructors `vector(Iter, Iter, Alloc = Alloc{})` and `assign(Iter, Iter)` don't correctly perform EmplaceConstruction from the result of dereferencing the iterator. This results in them performing an additional and unneeded copy.

This patch addresses the issue by correctly using `emplace_back` in C++11 and newer.

There are also some bugs in our `insert` implementation, but those will be handled separately.

@mclow.lists We should probably merge this into 5.1, agreed?

Reviewers: mclow.lists, dlj, EricWF

Reviewed By: mclow.lists, EricWF

Subscribers: cfe-commits, mclow.lists

Differential Revision: https://reviews.llvm.org/D38757
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/branches/release_50@318837 91177308-0d34-0410-b5e6-96231b3b80d8
8 years ago
..
vector.capacity Replace _LIBCPP_HAS_NO_<C++03 feature> with _LIBCPP_CXX03_LANG in vector. 9 years ago
vector.cons Merging r315994: 8 years ago
vector.data [libcxx] [test] D27027: Strip trailing whitespace. 9 years ago
vector.modifiers Sigh. Once again forgot about the 'no exceptions' bots. 9 years ago
vector.special [libcxx] [test] Fix Clang -Wunused-local-typedef, part 1/3. 9 years ago
allocator_mismatch.fail.cpp Add static_assert to set/multiset/map/multimap/forward_list/deque that the allocator's value_type match the container's value_type. vector/unordered/list/string already do this. Add tests for all the containers to verify this. 10 years ago
contiguous.pass.cpp [libcxx] [test] Fix MSVC x64 truncation warnings with 32-bit allocator size_type/difference_type. 9 years ago
iterators.pass.cpp [libcxx] [test] Replace _LIBCPP_STD_VER with TEST_STD_VER. 9 years ago
types.pass.cpp Replace __cplusplus comparisons and dialect __has_feature checks with TEST_STD_VER. 10 years ago