|
minmax_result<_Vty> _Found = {static_cast<_Vty>(*_UFirst), static_cast<_Vty>(*_UFirst)};
|
This is basically GCC PR104858, which has been resolved in libstdc++.
#include <algorithm>
#include <string>
#include <vector>
#include <iostream>
int main() {
std::vector<std::string> v{"1", "0"};
auto [min, max] = std::ranges::minmax(
std::ranges::subrange{
std::make_move_iterator(v.begin()),
std::make_move_iterator(v.end())});
std::cout << min << " " << max << "\n"; // only print 0 in MSVC-STL
}
https://godbolt.org/z/nM5a1Y9Gr
STL/stl/inc/algorithm
Line 10046 in 04ee878
This is basically GCC PR104858, which has been resolved in libstdc++.
https://godbolt.org/z/nM5a1Y9Gr