C++17 in Plasma

Nicolas Fella nicolas.fella at gmx.de
Fri Aug 21 18:21:42 BST 2020


do we have any rules on the C++ standard used in Plasma? Most Plasma
repos don't specify a CMAKE_CXX_STANDARD , defaulting to 11 through ECM.
Some, such as kwin set it to 14.

I found myself a few times in the situation where a C++17 feature would
have been useful, but it always felt like requiring 17 just for this
particular case wouldn't be justifiable. I do however believe that if
you sum up all these minor occasions it becomes significant. I therefore
propose to formalize that using C++17 in Plasma is acceptable.

Several KDE projects already require C++17 (keysmith, kio-fuse,
kio-extras, maui, kaidan, itinerary, sink, elisa, akonadi and
kactivitymanagerd). Given that kactivitymanagerd is technically part of
Plasma we even have precedence of using C++17 in Plasma. Qt6 will
require C++17 too.

With regards to compiler compatibility: gcc supports C++17 since version
5, Neon bionic, which is about as old a distro as I would reasonably
expect Plasma to support, ships gcc 7, so I don't expect any issues here.




More information about the Plasma-devel mailing list