diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index fac4c01..e350afd 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -41,6 +41,8 @@ jobs: args: "" - description: "Dynamic default" args: "-DBUILD_SHARED_LIBS=on" + - description: "static C++17" + args: "-DCMAKE_CXX_STANDARD=17" - description: "static C++20" args: "-DCMAKE_CXX_STANDARD=20" - description: "static C++23" diff --git a/CMakePresets.json b/CMakePresets.json index 0b645f2..ede9472 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -7,7 +7,7 @@ "generator": "Ninja", "binaryDir": "${sourceDir}/build/${presetName}", "cacheVariables": { - "CMAKE_CXX_STANDARD": "20" + "CMAKE_CXX_STANDARD": "17" } }, { diff --git a/include/beman/exemplar/identity.hpp b/include/beman/exemplar/identity.hpp index 789c319..9463125 100644 --- a/include/beman/exemplar/identity.hpp +++ b/include/beman/exemplar/identity.hpp @@ -30,11 +30,7 @@ struct __is_transparent; // not defined struct identity { // Returns `t`. template -#if defined(__cpp_constexpr) - constexpr -#endif - T&& - operator()(T&& t) const noexcept { + constexpr T&& operator()(T&& t) const noexcept { return std::forward(t); }