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/sequences/vector
Volodymyr Sapsai 354589c472 [libcxx] Optimize vectors construction of trivial types from an iterator range with const-ness mismatch.
We already have a specialization that will use memcpy for construction
of trivial types from an iterator range like

    std::vector<int>(int *, int *);

But if we have const-ness mismatch like

    std::vector<int>(const int *, const int *);

we would use a slow path that copies each element individually. This change
enables the optimal specialization for const-ness mismatch. Fixes PR37574.

Contributions to the patch are made by Arthur O'Dwyer, Louis Dionne.

rdar://problem/40485845

Reviewers: mclow.lists, EricWF, ldionne, scanon

Reviewed By: ldionne

Subscribers: christof, ldionne, howard.hinnant, cfe-commits

Differential Revision: https://reviews.llvm.org/D48342



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@350583 91177308-0d34-0410-b5e6-96231b3b80d8
6 years ago
..
vector.capacity Update all the max_size tests to eliminate signed/unsigned comparison warnings. NFC 6 years ago
vector.cons [libcxx] Optimize vectors construction of trivial types from an iterator range with const-ness mismatch. 6 years ago
vector.data [libcxx] [test] Untabify, NFC. 7 years ago
vector.erasure Implement P1209 - Adopt Consistent Container Erasure from Library Fundamentals 2 for C++20. Reviewed as https://reviews.llvm.org/D55532 6 years ago
vector.modifiers [libcxx] Fix incorrect iterator type in vector container test 6 years ago
vector.special [libcxx] [test] Change comments to say C++ instead of c++. NFC. 7 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. 9 years ago
contiguous.pass.cpp [libcxx] [test] Fix MSVC x64 truncation warnings with 32-bit allocator size_type/difference_type. 8 years ago
iterators.pass.cpp Fix a couple of 'unused variable' warnings in a vector test. NFC. 6 years ago
types.pass.cpp Replace __cplusplus comparisons and dialect __has_feature checks with TEST_STD_VER. 9 years ago