https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80363
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2017-04-08 Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 41160 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41160&action=edit gcc7-pr80363.patch Untested fix. As for std::{min,max} handling vector types, it would need to be some extension. I think it would need to return the vector directly rather than reference to it, because minimum or maximum vector might not be one of the operands, there is a precedent for it with min/max with std::initializer_list<T> argument though. Plus we'd need some trait to recognize vector types, then just return a < b ? a : b; or similar.