[Development] Compile errors, Qt configured with -qreal float

Marc Mutz marc.mutz at kdab.com
Thu Oct 27 08:23:57 CEST 2016


On Thursday 27 October 2016 01:23:15 Thiago Macieira wrote:
> On quinta-feira, 27 de outubro de 2016 00:49:21 PDT Ola Røer Thorsen wrote:
> > > https://codereview.qt-project.org/175025
> > 
> > That's sort of a "sledge hammer" fix. Wouldn't this make it easier to be
> > careless about mixing floats and doubles? I think it's a good practice to
> > avoid mixing when possible, with regards to performance especially on
> > smaller embedded devices.
> 
> Yes and no. qMax and qMin have been the bane of qreal for the last 10 years
> because they are template functions. Solving those two will solve 95%+ of
> the qreal=float issues. That means the chance of having a release that
> fails to build under that condition lessens considerably.

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.

Thanks,
Marc

-- 
Marc Mutz <marc.mutz at 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



More information about the Development mailing list