Difference between revisions of "Cpp features blocked by version"
From The Battle for Wesnoth Wiki
Pentarctagon (talk | contribs) (Created page with "== Features ==") |
(→Features: link to GCC's "concepts" meta-bug) |
||
(19 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
+ | == Summary == | ||
+ | This is a listing of C++ features that would be useful to have but can't yet be used. The Feature column is the language or standard library feature (https://en.cppreference.com/w/cpp/compiler_support is a good reference). The Benefit column is what having this feature will allow to be done. The remaining three columns are for the minimum requirements for the feature to be available on each platform. The minimum requirements can be anything - Visual Studio version, compiler version, OS version, etc. | ||
+ | |||
+ | == Benefits that don't justify version increases == | ||
+ | This is a non-exhaustive list: | ||
+ | * Improving compile speed. | ||
+ | * Pretty much any standard library feature that we can just as well get through boost or other means. | ||
+ | * Core language features that allow writing more succinct code. | ||
+ | |||
+ | == Benefits that do justify version increases == | ||
+ | This is a non-exhaustive list: | ||
+ | * Required to fix a bug that has a significant impact to players. | ||
+ | * Core language features that make classes of bugs impossible or significantly harder to accidentally introduce. | ||
+ | * Required to fix a relevant security vulnerability. | ||
+ | * A group of multiple smaller features that individually don't justify a version increase, if there's minimal to no impact to developers and players. | ||
+ | |||
== Features == | == Features == | ||
+ | {| class="wikitable sortable" | ||
+ | |- | ||
+ | ! Feature !! Benefit !! Windows !! macOS !! Linux !! Notes | ||
+ | |- | ||
+ | | Modules || Faster compile time || Unknown || Unknown || Unknown || While part of C++20, usable support seems to be progressing very slowly. | ||
+ | |- | ||
+ | | std::starts_with and ends_with || Simplies string checking in various places, including filesystem || MSVC STL 19.21 (VS 2019 16.1) || Apple Clang 10.0.0 (Xcode 10.0 beta (10L176w), 10.0 (10A255), 10.1 (10B61)) || GCC libstdc++ 9/Clang libc++ 6 || Boost offers similar functions. | ||
+ | |- | ||
+ | | std::format || Cleans up our numerous uses of manual string concatenation, especially with pango strings in the UI || Unknown || Unknown || Unknown || The wesnoth variable substitution facility offers similar functions, though with a little less versatility (but it could be extended). | ||
+ | |- | ||
+ | | std::span || Potential to reduce templates where we only need a container view || Unknown || Unknown || Unknown || | ||
+ | |- | ||
+ | | Concepts || Cleaner template requirements (increased code clarity) || Unknown || Unknown || Unknown || https://gcc.gnu.org/bugzilla/show_bug.cgi?id=concepts | ||
+ | |- | ||
+ | | Standard feature check macros || Ability to enable features on an individual basis without doing a whole-language flag || Unknown || Unknown || Unknown || Clang and likely GCC already support them on older versions as an extension. | ||
+ | |- | ||
+ | | std::filesystem || || Unknown || Just need to target 10.15 || Unknown || We do have boost.... | ||
+ | |} |
Latest revision as of 02:39, 11 August 2024
Contents
Summary
This is a listing of C++ features that would be useful to have but can't yet be used. The Feature column is the language or standard library feature (https://en.cppreference.com/w/cpp/compiler_support is a good reference). The Benefit column is what having this feature will allow to be done. The remaining three columns are for the minimum requirements for the feature to be available on each platform. The minimum requirements can be anything - Visual Studio version, compiler version, OS version, etc.
Benefits that don't justify version increases
This is a non-exhaustive list:
- Improving compile speed.
- Pretty much any standard library feature that we can just as well get through boost or other means.
- Core language features that allow writing more succinct code.
Benefits that do justify version increases
This is a non-exhaustive list:
- Required to fix a bug that has a significant impact to players.
- Core language features that make classes of bugs impossible or significantly harder to accidentally introduce.
- Required to fix a relevant security vulnerability.
- A group of multiple smaller features that individually don't justify a version increase, if there's minimal to no impact to developers and players.
Features
Feature | Benefit | Windows | macOS | Linux | Notes |
---|---|---|---|---|---|
Modules | Faster compile time | Unknown | Unknown | Unknown | While part of C++20, usable support seems to be progressing very slowly. |
std::starts_with and ends_with | Simplies string checking in various places, including filesystem | MSVC STL 19.21 (VS 2019 16.1) | Apple Clang 10.0.0 (Xcode 10.0 beta (10L176w), 10.0 (10A255), 10.1 (10B61)) | GCC libstdc++ 9/Clang libc++ 6 | Boost offers similar functions. |
std::format | Cleans up our numerous uses of manual string concatenation, especially with pango strings in the UI | Unknown | Unknown | Unknown | The wesnoth variable substitution facility offers similar functions, though with a little less versatility (but it could be extended). |
std::span | Potential to reduce templates where we only need a container view | Unknown | Unknown | Unknown | |
Concepts | Cleaner template requirements (increased code clarity) | Unknown | Unknown | Unknown | https://gcc.gnu.org/bugzilla/show_bug.cgi?id=concepts |
Standard feature check macros | Ability to enable features on an individual basis without doing a whole-language flag | Unknown | Unknown | Unknown | Clang and likely GCC already support them on older versions as an extension. |
std::filesystem | Unknown | Just need to target 10.15 | Unknown | We do have boost.... |
This page was last edited on 11 August 2024, at 02:39.