88
99// <vector>
1010
11- // void assign(_InputIterator __first, _InputIterator __last);
12- // void assign(_ForwardIterator __first, _ForwardIterator __last );
11+ // template <class InputIt>
12+ // constexpr void assign(InputIt first, InputIt last );
1313
1414#include < vector>
1515#include < cassert>
@@ -26,19 +26,19 @@ TEST_CONSTEXPR_CXX20 bool tests() {
2626 v.assign (It (in.begin ()), It (in.end ()));
2727 assert (v == in);
2828 }
29- { // No reallocation: fit wintin current size
30- bool in[] = {false , true , false , true , true };
31- TEST_CONSTEXPR std::size_t N = sizeof (in) / sizeof (in[0 ]);
29+ { // No reallocation: fit within current size
30+ bool in[] = {false , true , false , true , true };
31+ std::size_t N = sizeof (in) / sizeof (in[0 ]);
3232 std::vector<bool > v (2 * N, false );
3333 using It = forward_iterator<bool *>;
3434 v.assign (It (in), It (in + N));
3535 assert (v.size () == N);
3636 for (std::size_t i = 0 ; i < N; ++i)
3737 assert (v[i] == in[i]);
3838 }
39- { // No reallocation: fit wintin spare space
40- bool in[] = {false , true , false , true , true };
41- TEST_CONSTEXPR std::size_t N = sizeof (in) / sizeof (in[0 ]);
39+ { // No reallocation: fit within spare space
40+ bool in[] = {false , true , false , true , true };
41+ std::size_t N = sizeof (in) / sizeof (in[0 ]);
4242 std::vector<bool > v (N / 2 , false );
4343 v.reserve (N * 2 );
4444 using It = forward_iterator<bool *>;
@@ -58,19 +58,19 @@ TEST_CONSTEXPR_CXX20 bool tests() {
5858 v.assign (It (in.begin ()), It (in.end ()));
5959 assert (v == in);
6060 }
61- { // No reallocation: fit wintin current size
62- bool in[] = {false , true , false , true , true };
63- TEST_CONSTEXPR std::size_t N = sizeof (in) / sizeof (in[0 ]);
61+ { // No reallocation: fit within current size
62+ bool in[] = {false , true , false , true , true };
63+ std::size_t N = sizeof (in) / sizeof (in[0 ]);
6464 std::vector<bool > v (2 * N, false );
6565 using It = cpp17_input_iterator<bool *>;
6666 v.assign (It (in), It (in + N));
6767 assert (v.size () == N);
6868 for (std::size_t i = 0 ; i < N; ++i)
6969 assert (v[i] == in[i]);
7070 }
71- { // No reallocation: fit wintin spare space
72- bool in[] = {false , true , false , true , true };
73- TEST_CONSTEXPR std::size_t N = sizeof (in) / sizeof (in[0 ]);
71+ { // No reallocation: fit within spare space
72+ bool in[] = {false , true , false , true , true };
73+ std::size_t N = sizeof (in) / sizeof (in[0 ]);
7474 std::vector<bool > v (N / 2 , false );
7575 v.reserve (N * 2 );
7676 using It = cpp17_input_iterator<bool *>;
0 commit comments