[Qt-creator] Using C++11 in Creator's source

Ziller Eike Eike.Ziller at digia.com
Fri Mar 28 08:45:30 CET 2014


On Mar 4, 2014, at 2:09 PM, Daniel Teske <daniel.teske at digia.com> wrote:

> Hi,
> 
> since we have branched 3.1 from master, master no longer needs to support OS X 
> 10.6. As such I propose, that we open up master for those C++11 features that 
> are supported by VS 2010, g++ 4.5 and clang 3.1.
> 
> I think it's too early to require a newer version of Visual Studio, though 
> requiring those 3 compilers gives us both *auto* and *lambda*.

Since we just ran into it, the explicit statement:

*** “override” is NOT part of the C++11 features we could use ***

It is not supported by gcc < 4.7.
If you really really really want to use the ‘override’ feature in Qt Creator code, you need to use our QTC_OVERRIDE macro.
Which maps to QT_OVERRIDE when compiling with Qt5, and to nothing when compiling with Qt4, and makes your code look really ugly.

> I suspect that in practice the minimum g++ or clang version will be higher, 
> since practically no one uses those versions any more. 
> 
> We need to extend the coding rules for auto and lambda. Suggestions are 
> welcome for that.
> 
> Ps:
> Keep merges from 3.1 easy, by not unnecessarily rewriting code. Wait until 3.1 
> is mostly done.
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator

-- 
Eike Ziller, Senior Software Engineer - Digia, Qt
 
Digia Germany GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Tuula Haataja
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B




More information about the Qt-creator mailing list