From fd3baddbc2501560d50b632bc4a11a39a21c1d02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Pir=C3=B3g?= <69601940+aetn23@users.noreply.github.com> Date: Fri, 1 Jul 2022 16:50:38 +0200 Subject: [PATCH] Clarification of C++ standard usage (#4839) --- CMakeLists.txt | 3 +++ docs/CONTRIBUTING.md | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c59c9042c..8380f6113 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -240,6 +240,9 @@ if(GPERF) endif() endif() +# Despite setting C++ standard to 20, features from this version are not being used. +# The oldest compiler used is GCC 6.5 - and that defines our C++ feature set (meaning most of C++17). +# It's present only to take advantage of fmt::format build time errors. set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_STANDARD_REQUIRED OFF) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index b2eabb4ee..e37655b1f 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -3,6 +3,11 @@ This guide outlines useful resources, tools and processes for contribution to DevilutionX. +## C++ Standard +Despite setting C++ standard to 20 in CMakeLists.txt, features from this version are not being used. +The oldest compiler used is GCC 6.5 - and that defines our C++ feature set (meaning most of C++17). +It's present only to take advantage of fmt::format build time errors. + ## Code style guide [The code style guide](https://github.com/diasurgical/devilutionX/wiki/Code-Style) is evolving with the project.