The following testcase fails (with -std=gnu++0x): #include <utility> #include <algorithm> #include <vector>
using namespace std; int main() { vector<int> v{1,2,3,4,5}; auto p = minmax({v}); if (p.first != v) std::abort(); return 0; } The value of v is something like [random number, 0, 3, 4, 5] for both p.frist and p.second. Chris -- Summary: [c++0x] minmax with initializer_list gives incorrect results Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: chris dot fairles at gmail dot com GCC build triplet: x86_64-redhat-linux GCC host triplet: x86_64-redhat-linux GCC target triplet: x86_64-redhat-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37547