diff options
| author | Leitwolf11 | 2026-10-31 13:01:04 +0300 |
|---|---|---|
| committer | Leitwolf11 | 2026-10-31 13:01:04 +0300 |
| commit | 1f5458322669301f62599c1ec5dacb77b5dc2d8d (patch) | |
| tree | 7e32402fa9c06014328a27d7972c2fb1a9484352 /Guide/TOOLING.md | |
| parent | 8d1fb4807edc7920fbecd0554c9c61625827e19c (diff) | |
| download | progmasoft-cpp-docs/cpp17-and-cpp20.tar.gz | |
Cover C++17 as well as C++20docs/cpp17-and-cpp20
A project now picks one version. C++20 stays the default, and C++17 is
for libraries meant for other people's projects, because it is still the
widest common target and works in every later standard.
Section 5.13 gives the C++17 form of each C++20 feature the guide uses
and the checks such a project needs: CI in the versions it promises, with
each compiler, and headers that compile in default compiler modes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'Guide/TOOLING.md')
| -rw-r--r-- | Guide/TOOLING.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Guide/TOOLING.md b/Guide/TOOLING.md index 1a2ceaa..5852cd4 100644 --- a/Guide/TOOLING.md +++ b/Guide/TOOLING.md @@ -15,7 +15,7 @@ as errors, in a CI job of its own. ### Flags ```text --std=c++20 +-std=c++20 # -std=c++17 in a C++17 project -fno-exceptions -Wall -Wextra -Wpedantic -Werror -Wshadow @@ -36,7 +36,7 @@ as errors, in a CI job of its own. -Wcomma ``` -With `clang-cl`, each flag is passed as `/clang:<flag>`, and the language standard as `/std:c++20`. +With `clang-cl`, each flag is passed as `/clang:<flag>`, and the language standard as `/std:c++20` or `/std:c++17`. These flags apply to first-party code only. Third-party code is compiled with its own options; its headers are included as system headers (`-isystem`, or the build tool's equivalent), so their warnings do not fail the build. |