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/deque/deque.cons
Eric Fiselier 94c3917960 [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/trunk@315994 91177308-0d34-0410-b5e6-96231b3b80d8
8 years ago
..
alloc.pass.cpp Support allocators with explicit conversion constructors. Fixes bug #29000 9 years ago
assign_initializer_list.pass.cpp Replace _LIBCPP_HAS_NO_<C++03 feature> with _LIBCPP_CXX03_LANG in deque 9 years ago
assign_iter_iter.pass.cpp [libc++] Fix PR34898 - vector iterator constructors and assign method perform push_back instead of emplace_back. 8 years ago
assign_size_value.pass.cpp [libcxx] [test] D27022: Fix MSVC warning C4389 "signed/unsigned mismatch", part 9/12. 9 years ago
copy.pass.cpp [libc++] Remove various C++03 feature test macros 9 years ago
copy_alloc.pass.cpp Replace __cplusplus comparisons and dialect __has_feature checks with TEST_STD_VER. 10 years ago
default.pass.cpp [libc++] Fix stack_allocator 9 years ago
default_noexcept.pass.cpp [libcxx] [test] Fix Clang -Wunused-local-typedef, part 1/3. 9 years ago
dtor_noexcept.pass.cpp [libcxx] [test] Fix Clang -Wunused-local-typedef, part 1/3. 9 years ago
initializer_list.pass.cpp Replace _LIBCPP_HAS_NO_<C++03 feature> with _LIBCPP_CXX03_LANG in deque 9 years ago
initializer_list_alloc.pass.cpp Replace _LIBCPP_HAS_NO_<C++03 feature> with _LIBCPP_CXX03_LANG in deque 9 years ago
iter_iter.pass.cpp [libc++] Fix PR34898 - vector iterator constructors and assign method perform push_back instead of emplace_back. 8 years ago
iter_iter_alloc.pass.cpp [libc++] Fix PR34898 - vector iterator constructors and assign method perform push_back instead of emplace_back. 8 years ago
move.pass.cpp Replace _LIBCPP_HAS_NO_<C++03 feature> with _LIBCPP_CXX03_LANG in deque 9 years ago
move_alloc.pass.cpp Replace _LIBCPP_HAS_NO_<C++03 feature> with _LIBCPP_CXX03_LANG in deque 9 years ago
move_assign.pass.cpp Replace _LIBCPP_HAS_NO_<C++03 feature> with _LIBCPP_CXX03_LANG in deque 9 years ago
move_assign_noexcept.pass.cpp [libcxx] [test] Fix Clang -Wunused-local-typedef, part 1/3. 9 years ago
move_noexcept.pass.cpp [test] Allow other implementations to strengthen noexcept on deque's move constructor 8 years ago
op_equal.pass.cpp Replace __cplusplus comparisons and dialect __has_feature checks with TEST_STD_VER. 10 years ago
op_equal_initializer_list.pass.cpp Replace _LIBCPP_HAS_NO_<C++03 feature> with _LIBCPP_CXX03_LANG in deque 9 years ago
size.pass.cpp [libcxx] [test] Fix Clang -Wunused-local-typedef, part 2/3. 9 years ago
size_value.pass.cpp [libcxx] [test] D27021: Fix MSVC warning C4389 "signed/unsigned mismatch", part 8/12. 9 years ago
size_value_alloc.pass.cpp [libcxx] [test] D27021: Fix MSVC warning C4389 "signed/unsigned mismatch", part 8/12. 9 years ago