The compiler can't tell that the vector size fits in int, so it thinks
it might overflow to a negative value, which would then be a huge
positive size_t. In reality, the vector size never exceeds five.
There's no warning on trunk, so just change the local variable to use
type unsigned so that we get rid of the warning on the branches.
libstdc++-v3/ChangeLog:
PR libstdc++/116212
* testsuite/20_util/specialized_algorithms/uninitialized_move/constrained.cc:
Use unsigned for vector size.
{
ix = saved_ix;
- int size = ix.size();
+ unsigned size = ix.size();
auto buffer = std::unique_ptr<char[]>(new char[sizeof(T)*size]);
std::span<T> rx((T *)buffer.get(), size);