This table lists C++14 and C++17 features and whether they can be used in Inkscape or not (yet). Add C++14 or C++17 features that you would like to use to the table, so that we know what to test for to increase the C++17 "allowance".
||C++11||from 1.0||Allows passing ownership of internal resources between objects|
||C++11||from 1.1||Strong enum constants (take the name of the enum, can't be implicitly converted to |
||C++14||from 1.1||Replaces |
||C++14||from 1.1||Declares a variable as usable in a const expression|
||C++17||from 1.1||Guarantees the branches will be decided at compile-time|
||C++17||from 1.1||Type-safe union, where the contained type is known at runtime|
||C++17||from 1.1||Object type (not a pointer or reference) which can either exist or be |
||C++17||from 1.1||Structured binding, for returning more than a single value|
||C++17||from 1.1||Nested namespaces|
||C++17||from 1.1||Inline variables (inside header files)|
||C++17||not yet||Filesystem library (may not be useful as we are using Gio::File). Also only supported from gcc 8, and Ubuntu 18.04 only has gcc 7.|
|toxic feature of doom||NO||Never use this (in case we stumble upon C++14/C++17 features that we really don't like)|
We need to keep coordinated with the section on Distro Dependencies.
Also see this page:
__cplusplus is always
1 for GCC 4.6 that is used on Windows. So
#if __cplusplus < 201103L or variants does not work to choose between C++03 or C++11 code.
C++17 is well supported by all major compilers.
Compiler version when feature complete:
|C++17||7 (2017)||4 (2017) (5 for constexpr lambda expressions)||19.14 (2017)|
'*' Mostly complete '#' About half complete