[Development] Q_COMPILER_RANGE_FOR not supported by/defined for VS2012 and VS2013 ?

Michael Möllney mail at michaelmoellney.de
Mon Feb 29 22:13:50 CET 2016


Am 29.02.2016 um 22:47 schrieb Marc Mutz:
> On Monday 29 February 2016 18:33:39 Michael Möllney wrote:
>> What confused me was that
>> Q_COMPILER_RANGE_FOR
>> is first defined for VS2015, the older ones are not setting this define.
> Try
>
>     for (int i : container)
>        QCOMPARE(i, i);
>
> on VS < 2015. You'll hit a parse error.
>
> For more details on what's supposed to be allowed and what not:
>    https://codereview.qt-project.org/142782
>
> HTH,
> Marc
>

Ah, ok, thank you for the details.

Maybe someone could teach the "Qt Sanity Bot" to detect that pattern, so 
(gcc) developers that are VS agnostic
(or simply do not have that MS platform in access) could still support 
in patching Qt.

Cheers
Michael




More information about the Development mailing list