[Qt-creator] C++11 in Creator's source: Update required features

Daniel Teske Daniel.Teske at theqtcompany.com
Tue Mar 3 14:21:33 CET 2015


Hi,

almost exactly a year ago we allowed the usage of some C++11 features in Qt 
Creator's source code and effectively dropped support for Visual Studio 2008, 
g++ < 4.5 and clang < 3.1.

As a quick browse around the Qt Creator source code shows, those features are 
nowadays quite common and lead to code that is imho easier to maintain.

It's time to discuss whether we should move forward and require an even 
greater subset of C++11.

I thus suggest requiring the subset of C++11 that is implemented by VS 2013, 
g++ 4.7 and clang 3.1 in master. 

We don't require using those specific compilers, any fully compliant C++11 
compiler should work, but we typically only compile with compilers from those 
3 mentioned vendors.

This would open up at least the following C++11 features (I've not included a 
few items that are probably not relevant to our usages):

* Non static data member initializers
* Variadic templates
* Initializer lists
* Alias templates
* Strongly typed enums
* Delegating constructors
* Defaulted and deleted functions
* Range based for loop
* override and final
* nullptr

This is quite a list of new stuff and I would expect a few items to be somewhat 
controversial. Just like last time, we need to discuss the coding style for 
each feature.

daniel







More information about the Qt-creator mailing list