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.
libcxx/test/std/containers
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
..
associative Fix bug 33389 - __is_transparent check requires too much 9 years ago
container.adaptors Fix tests for extended noexcept in the container adaptors tests 9 years ago
container.requirements Move test into test/std subdirectory. 11 years ago
containers.general Move test into test/std subdirectory. 11 years ago
sequences Merging r315994: 8 years ago
unord Cleanup _LIBCPP_HAS_NO_<c++11-feature> in std::unordered_map and std::unordered_multimap 9 years ago
Copyable.h Move test into test/std subdirectory. 11 years ago
Emplaceable.h Cleanup _LIBCPP_HAS_NO_<c++11-feature> in std::unordered_map and std::unordered_multimap 9 years ago
NotConstructible.h Move test into test/std subdirectory. 11 years ago
map_allocator_requirement_test_templates.h Fix LWG issue 2345 - Add insert(value_type&&) 10 years ago
nothing_to_do.pass.cpp Move test into test/std subdirectory. 11 years ago
set_allocator_requirement_test_templates.h Teach map/unordered_map how to optimize 'emplace(Key, T)'. 10 years ago
test_compare.h Move test into test/std subdirectory. 11 years ago
test_hash.h Move test into test/std subdirectory. 11 years ago