In case of input iterators, the loop that assigns to existing elements
should run up to number of elements in vector (_M_size) not capacity (_Nm).
PR libstdc++/119137
libstdc++-v3/ChangeLog:
* include/std/inplace_vector (inplace_vector::assign_range):
Replace _Nm with _M_size in the assigment loop.
auto __in = ranges::begin(__rg);
auto __end = ranges::end(__rg);
size_type __n = 0;
- for (; __n < _Nm && __in != __end; ++__in)
+ for (; __n < _M_size && __in != __end; ++__in)
_M_elems[__n++] = *__in;
if (__in == __end)