From a9cc5030c002a3e9b397b79e6c40f77bde291621 Mon Sep 17 00:00:00 2001 From: Mark Rotteveel Date: Fri, 11 Jul 2025 08:28:46 +0200 Subject: [PATCH 1/3] Add /Zc:__cplusplus and set C++17 --- extern/cloop/src/cloop/cloop.vcxproj | 6 +++++- extern/cloop/src/tests/test1/test1-cpp-dll.vcxproj | 6 +++++- extern/cloop/src/tests/test1/test1-cpp-exe.vcxproj | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/extern/cloop/src/cloop/cloop.vcxproj b/extern/cloop/src/cloop/cloop.vcxproj index eee16a54c39..8e72817dcae 100644 --- a/extern/cloop/src/cloop/cloop.vcxproj +++ b/extern/cloop/src/cloop/cloop.vcxproj @@ -119,6 +119,8 @@ Level3 ProgramDatabase Disabled + stdcpp17 + /Zc:__cplusplus %(AdditionalOptions) true @@ -146,6 +148,8 @@ MultiThreadedDLL Level3 ProgramDatabase + stdcpp17 + /Zc:__cplusplus %(AdditionalOptions) true @@ -171,4 +175,4 @@ - + \ No newline at end of file diff --git a/extern/cloop/src/tests/test1/test1-cpp-dll.vcxproj b/extern/cloop/src/tests/test1/test1-cpp-dll.vcxproj index 03acdd5900a..c5a24cab979 100644 --- a/extern/cloop/src/tests/test1/test1-cpp-dll.vcxproj +++ b/extern/cloop/src/tests/test1/test1-cpp-dll.vcxproj @@ -129,6 +129,8 @@ Level3 ProgramDatabase Disabled + /Zc:__cplusplus %(AdditionalOptions) + stdcpp17 true @@ -158,6 +160,8 @@ MultiThreadedDLL Level3 ProgramDatabase + /Zc:__cplusplus %(AdditionalOptions) + stdcpp17 true @@ -176,4 +180,4 @@ - + \ No newline at end of file diff --git a/extern/cloop/src/tests/test1/test1-cpp-exe.vcxproj b/extern/cloop/src/tests/test1/test1-cpp-exe.vcxproj index 8aed4d0a303..26ead73b5ac 100644 --- a/extern/cloop/src/tests/test1/test1-cpp-exe.vcxproj +++ b/extern/cloop/src/tests/test1/test1-cpp-exe.vcxproj @@ -129,6 +129,8 @@ Level3 Disabled WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + /Zc:__cplusplus %(AdditionalOptions) + stdcpp17 Console @@ -161,6 +163,8 @@ true true WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + /Zc:__cplusplus %(AdditionalOptions) + stdcpp17 Console @@ -178,4 +182,4 @@ - + \ No newline at end of file From afc0f98c5d174a18040ddc8fe70e14d21d4d9e5c Mon Sep 17 00:00:00 2001 From: Mark Rotteveel Date: Fri, 11 Jul 2025 08:31:07 +0200 Subject: [PATCH 2/3] Use inline constexpr for C++17 and higher in generated header --- extern/cloop/src/cloop/Generator.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extern/cloop/src/cloop/Generator.cpp b/extern/cloop/src/cloop/Generator.cpp index 3cfdd2311fb..5a3ca56f65e 100644 --- a/extern/cloop/src/cloop/Generator.cpp +++ b/extern/cloop/src/cloop/Generator.cpp @@ -191,7 +191,9 @@ void CppGenerator::generate() fprintf(out, "#endif\n\n\n"); fprintf(out, "#ifndef CLOOP_CONSTEXPR\n"); - fprintf(out, "#if __cplusplus >= 201103L\n"); + fprintf(out, "#if __cplusplus >= 201703L\n"); + fprintf(out, "#define CLOOP_CONSTEXPR inline constexpr\n"); + fprintf(out, "#elif __cplusplus >= 201103L\n"); fprintf(out, "#define CLOOP_CONSTEXPR constexpr\n"); fprintf(out, "#else\n"); fprintf(out, "#define CLOOP_CONSTEXPR const\n"); From cfc0792607986acd729dbdda411e7c97a39bd574 Mon Sep 17 00:00:00 2001 From: Mark Rotteveel Date: Fri, 11 Jul 2025 08:47:01 +0200 Subject: [PATCH 3/3] Add regenerated IdlFbInterfaces.h header --- src/include/firebird/IdlFbInterfaces.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/include/firebird/IdlFbInterfaces.h b/src/include/firebird/IdlFbInterfaces.h index 3033b9cff67..0da59e7f052 100644 --- a/src/include/firebird/IdlFbInterfaces.h +++ b/src/include/firebird/IdlFbInterfaces.h @@ -17,7 +17,9 @@ #ifndef CLOOP_CONSTEXPR -#if __cplusplus >= 201103L +#if __cplusplus >= 201703L +#define CLOOP_CONSTEXPR inline constexpr +#elif __cplusplus >= 201103L #define CLOOP_CONSTEXPR constexpr #else #define CLOOP_CONSTEXPR const