KDE developers are currently contemplating the idea of allowing a subset of the C++11 language to be used within the KDevelop code-base. This C++11 change would happen for the KDevelop 4.6 integrated development environment release. Reasons are shared in this article for why one should consider using C++11 code.
Milian Wolff, a developer on the KDevelop IDE, has proposed to their development community that a subset of the C++11 language be permitted following the KDevelop 4.5 branching in a few weeks.
While KDevelop is a promising open-source IDE for developers, this C++11 change is being mentioned since there's likely many Phoronix readers curious about the reasoning behind this proposal. The reasons were shared
and include C++11 being "quite a lot of fun" to develop, which is actually the main reason for this proposal.
There are also technical reasons behind this proposal: C++11 can offer potential performance benefits by using constantexpr, noexpect, r- value references, and other new language features.
C++11 code is also potentially easier to read thanks to auto, lambdas, alias templates, defaulted functions, and other features that can improve the maintianability of the code-base. There's also improved compiler analysis with features like static assert, override, final, nullptr, explicit conversion operators, deleted functions, etc. An overview of C++11 changes can be found via Wikipedia
For those curious about the C++11 language support state in different compilers, it's nicely documented on the Apache.org Wiki
. The C++11 compiler support basically comes down to LLVM/Clang 3.1 and GCC 4.7 (there is also greater C++11 support in GCC 4.8
) as the primary base targets.
There are some potential issues with a migration to C++11 code though due to some Linux distributions sticking to older compiler releases, the varying compiler state in BSD, potential problems with Microsoft MSVC on Windows, and the back-porting of KDevelop changes to older releases.
In terms of KDevelop handling C++11 code through the IDE itself, there's been basic C++11 support
dating back to KDevelop 4.3.
Qt 5.0 is taking advantage of C++11
too, but there it's being handled in a backwards compatible manner so the code will still build as C++03 on older compilers. There is also more Qt C++11 developer information shared via slides from the recent Qt Developer Days
event. KDE Frameworks 5 may also use C++11