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

Alexander Nassian nassian at bitshift-dynamics.de
Thu Oct 27 08:28:34 CEST 2016


> Am 27.10.2016 um 08:23 schrieb Marc Mutz <marc.mutz at kdab.com>:
> 
>> 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.
> 

And depend more and more on different std implementations that introduce different behavior on different platforms and compilers? And let external software (that gcc issue is not that long in the past) break Qt's binary compatibility?

Personally, I always prefer the uniform Qt style as I can rely on that platform and compiler independent functionality. Also I prefer code that looks like made out of a single piece. I don't like to incorporate x different libraries with x different coding and API styles. If so, I could also go and use GTK *ugh*

Just my 2 cents ;)

Best regards,
Alexander Nassian



More information about the Development mailing list