llvm-project/libcxx/test/std/containers
Eric Fiselier 1c0cedccb6 [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

llvm-svn: 315994
2017-10-17 13:03:17 +00:00
..
associative [libcxx] [test] Untabify, NFC. 2017-07-29 00:55:10 +00:00
container.adaptors [libcxx] [test] Untabify, NFC. 2017-07-29 00:55:10 +00:00
container.requirements
containers.general
sequences [libc++] Fix PR34898 - vector iterator constructors and assign method perform push_back instead of emplace_back. 2017-10-17 13:03:17 +00:00
unord [libcxx] [test] Make files consistently end with newlines, NFC. 2017-07-29 00:55:22 +00:00
Copyable.h
Emplaceable.h [libcxx] [test] Update for C++17 feature removals. 2017-08-24 21:24:08 +00:00
NotConstructible.h [libcxx] [test] Update for C++17 feature removals. 2017-08-24 21:24:08 +00:00
map_allocator_requirement_test_templates.h Fix LWG issue 2345 - Add insert(value_type&&) 2016-04-18 01:40:45 +00:00
nothing_to_do.pass.cpp
set_allocator_requirement_test_templates.h Teach map/unordered_map how to optimize 'emplace(Key, T)'. 2016-04-16 00:23:12 +00:00
test_compare.h
test_hash.h