Skip to content

Commit 803d52f

Browse files
Adopt @winner245's review comments on comments
1 parent a5c21b2 commit 803d52f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

libcxx/include/__vector/vector.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ class _LIBCPP_TEMPLATE_VIS vector {
618618
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
619619
__insert_assign_n_unchecked(_Iterator __first, difference_type __n, pointer __position) {
620620
#if _LIBCPP_STD_VER >= 23
621-
if constexpr (!forward_iterator<_Iterator>) {
621+
if constexpr (!forward_iterator<_Iterator>) { // Handles input-only sized ranges for insert_range
622622
ranges::copy_n(std::move(__first), __n, __position);
623623
} else
624624
#endif

libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ TEST_CONSTEXPR_CXX20 bool tests() {
163163
for (; j < 105; ++j)
164164
assert(v[j] == 0);
165165
}
166-
{
166+
{ // Ensure that iterator-pair insert() doesn't use unexpected assignment.
167167
struct Wrapper {
168168
TEST_CONSTEXPR Wrapper(int n) : n_(n) {}
169169

0 commit comments

Comments
 (0)