[Development] Qt LTS & C++11 plans

Knoll Lars Lars.Knoll at theqtcompany.com
Tue Nov 10 21:22:28 CET 2015


On 10/11/15 19:43, "Olivier Goffart" <olivier at woboq.com> wrote:

>On Tuesday 23. June 2015 10:17:40 Knoll Lars wrote:
>[...]
>> Qt 5.7:
>> * New compiler baseline with gcc 4.7 and VC++ 2012
>> * Enable and use the C++11 features supported by these compilers
>> unconditionally
>
>By "C++11 features", do you mean only core language feature, or can we also 
>use standard library features.

The core language features are certainly ok. Standard library features is something where we've always been a bit more careful, as the level of support for them from different standard library implementations has unfortunately been somewhat orthogonal to the compiler discussion (see the discussion about atomics a few weeks ago).

At least for now, I don't want us to rely too much on standard library features in our APIs (ie. Using these types in the APIs we expose to our users).

But I am not opposed to using any of these features in our implementation, if they work on all platforms we currently support with Qt 5.7. 

>
>For example I would like to use std::enable_if instead of QtPrivate::QEnableIf
>[https://codereview.qt-project.org/140266]
>Clang would then gives better error messages because it knows about it. 
>
>I would also want to use the type traits such as std::is_trivial and 
>std::is_trivially_copyable
>[https://codereview.qt-project.org/140476]
>
>Likewise, Marc is trying to use std::declval and type traits
>in exception specification [https://codereview.qt-project.org/140132/]
>
>Not to mention that we already use directly things like std::move or 
>std::forward.
>
>Since all of these are C++11 features supported by these compiler, I would 
>assume that we can use them unconditionally.

We should check that these features work and are supported on all the platforms we target with 5.7. If they are, I'm ok to use them. The usual suspects that could cause issues are VS2012 (WEC2013), QNX 6.6, and RHEL. 

Ideally, we could simply let the CI decide whether the feature works, but unfortunately I don't think we're currently running auto tests for QNX or WEC. So we'll know whether things compile on those platforms, but we don't know whether they work without someone actually trying it out.

Cheers,
Lars



More information about the Development mailing list