On Thursday 27 October 2016 08:41:19 Thiago Macieira wrote: > On quinta-feira, 27 de outubro de 2016 08:23:57 PDT Marc Mutz wrote: > > And, again, by proprietarily extending a perfectly adequate std > > functionality, we lock ourselves deeper into our NIHS, losing new > > functionality provided by newer std versions, in this case: variadic > > std::min/max. > > Hm... you're actually right. We should use std::min and std::max since we > can now rely on them existing and being properly implemented. I don't know > a Standard Library equivalent of qBound, but I wasn't fixing that one due > to too many permutations. > > We should drop qMin and qMax like we have the QtAlgorithms header. > > I trust you checked VS 2013 and Dinkumware.
Well, we have no variadic qMin(), so existing qMin() uses will all be binary. And binary std::min() is C++98, which we require since Qt 5.0. Ergo, nothing to do, except check whether we rely on the corrected relation between min and max anywhere (for equivalent elements, min() should returnt the one max() does not, which IIRC qMin()/qMax() do, but, notably, std::min/max do not, unless they changed it in C++14+). Thanks, Marc -- Marc Mutz <marc.m...@kdab.com> | Senior Software Engineer KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company Tel: +49-30-521325470 KDAB - The Qt, C++ and OpenGL Experts _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development