Skip to content

Commit 1bd8918

Browse files
committed
Default C++ standard version to C++20 (#397)
1 parent d5f59d1 commit 1bd8918

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

CMakePresets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"generator": "Ninja",
88
"binaryDir": "${sourceDir}/build/${presetName}",
99
"cacheVariables": {
10-
"CMAKE_CXX_STANDARD": "17",
10+
"CMAKE_CXX_STANDARD": "20",
1111
"CMAKE_CXX_EXTENSIONS": false,
1212
"CMAKE_CXX_STANDARD_REQUIRED": true,
1313
"CMAKE_EXPORT_COMPILE_COMMANDS": true,

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ that this requires GoogleTest to be installed.
4343
cmake \
4444
-B build \
4545
-S . \
46-
-DCMAKE_CXX_STANDARD=17 \
46+
-DCMAKE_CXX_STANDARD=20 \
4747
# Your extra arguments here.
4848
cmake --build build
4949
ctest --test-dir build
@@ -73,7 +73,7 @@ Example commands:
7373
cmake \
7474
-B build \
7575
-S . \
76-
-DCMAKE_CXX_STANDARD=17 \
76+
-DCMAKE_CXX_STANDARD=20 \
7777
-DCMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake"
7878
cmake --build build
7979
ctest --test-dir build
@@ -97,7 +97,7 @@ Example commands:
9797
cmake \
9898
-B build \
9999
-S . \
100-
-DCMAKE_CXX_STANDARD=17 \
100+
-DCMAKE_CXX_STANDARD=20 \
101101
-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=./infra/cmake/use-fetch-content.cmake
102102
cmake --build build
103103
ctest --test-dir build

cookiecutter/check_cookiecutter.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function stamp() {
1616
--output-dir "$output_dir" \
1717
"$cookiecutter_dir" \
1818
project_name="exemplar" \
19-
minimum_cpp_build_version="17" \
19+
minimum_cpp_build_version="20" \
2020
paper="P0898R3" \
2121
description="A Beman Library Exemplar" \
2222
unit_test_library="$unit_test_library" \
@@ -60,7 +60,7 @@ function check_templating() {
6060
--output-dir "$out_dir_path" \
6161
"$script_dir" \
6262
project_name="RLZrmX9NfS" \
63-
minimum_cpp_build_version="17" \
63+
minimum_cpp_build_version="20" \
6464
paper="P0898R3" \
6565
description="A Beman Library RLZrmX9NfS" \
6666
_generating_exemplar="false" \
@@ -70,7 +70,7 @@ function check_templating() {
7070
local grep_path
7171
grep_path=$(mktemp)
7272
grep \
73-
--dereference-recursive --context=5 --color=always \
73+
-R --context=5 --color=always \
7474
-e "exemplar" -e "identity" "$out_dir_path/RLZrmX9NfS" > "$grep_path" || true
7575
rm -rf "$out_dir_path"
7676
if [[ $(wc -l "$grep_path" | cut -d' ' -f1) -gt 0 ]] ; then

cookiecutter/{{cookiecutter.project_name}}/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Example commands:
7373
cmake \
7474
-B build \
7575
-S . \
76-
-DCMAKE_CXX_STANDARD=17 \
76+
-DCMAKE_CXX_STANDARD={{cookiecutter.minimum_cpp_build_version}} \
7777
-DCMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake"
7878
cmake --build build
7979
ctest --test-dir build

0 commit comments

Comments
 (0)