Skip to content

Commit c50158f

Browse files
committed
Use C++ templates to create specialization of Interpreter loop
Previously, I used macros, because I couldn’t figure out how to get this to work with templates. Turns out the template parameter shouldn’t be a function parameter, which I for some reason thought would be needed before. Signed-off-by: Stefan Marr <[email protected]>
1 parent a662c18 commit c50158f

File tree

7 files changed

+617
-627
lines changed

7 files changed

+617
-627
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ cmake_minimum_required (VERSION 3.12)
2121
project(SOMpp LANGUAGES CXX)
2222

2323
set(CMAKE_PROJECT_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
24-
set(CMAKE_CXX_STANDARD 14)
24+
set(CMAKE_CXX_STANDARD 17)
2525

2626
set(ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
2727
set(SRC_DIR "${ROOT_DIR}/src")

SOM.xcodeproj/project.pbxproj

+8-4
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,7 @@
11231123
isa = XCBuildConfiguration;
11241124
buildSettings = {
11251125
CLANG_ADDRESS_SANITIZER_CONTAINER_OVERFLOW = YES;
1126-
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
1126+
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
11271127
CLANG_CXX_LIBRARY = "libc++";
11281128
CLANG_ENABLE_MODULES = YES;
11291129
CLANG_ENABLE_OBJC_ARC = YES;
@@ -1136,7 +1136,7 @@
11361136
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
11371137
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
11381138
DEAD_CODE_STRIPPING = YES;
1139-
GCC_C_LANGUAGE_STANDARD = gnu99;
1139+
GCC_C_LANGUAGE_STANDARD = c17;
11401140
GCC_DYNAMIC_NO_PIC = NO;
11411141
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
11421142
GCC_OPTIMIZATION_LEVEL = 0;
@@ -1180,7 +1180,7 @@
11801180
isa = XCBuildConfiguration;
11811181
buildSettings = {
11821182
CLANG_ADDRESS_SANITIZER_CONTAINER_OVERFLOW = YES;
1183-
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
1183+
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
11841184
CLANG_CXX_LIBRARY = "libc++";
11851185
CLANG_ENABLE_MODULES = YES;
11861186
CLANG_ENABLE_OBJC_ARC = YES;
@@ -1195,7 +1195,7 @@
11951195
DEAD_CODE_STRIPPING = YES;
11961196
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
11971197
ENABLE_NS_ASSERTIONS = NO;
1198-
GCC_C_LANGUAGE_STANDARD = gnu99;
1198+
GCC_C_LANGUAGE_STANDARD = c17;
11991199
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
12001200
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
12011201
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
@@ -1232,6 +1232,7 @@
12321232
isa = XCBuildConfiguration;
12331233
buildSettings = {
12341234
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
1235+
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
12351236
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
12361237
CLANG_WARN_BOOL_CONVERSION = YES;
12371238
CLANG_WARN_COMMA = YES;
@@ -1255,6 +1256,7 @@
12551256
ENABLE_STRICT_OBJC_MSGSEND = YES;
12561257
ENABLE_TESTABILITY = YES;
12571258
ENABLE_USER_SCRIPT_SANDBOXING = YES;
1259+
GCC_C_LANGUAGE_STANDARD = c17;
12581260
GCC_NO_COMMON_BLOCKS = YES;
12591261
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
12601262
GCC_WARN_ABOUT_RETURN_TYPE = YES;
@@ -1279,6 +1281,7 @@
12791281
isa = XCBuildConfiguration;
12801282
buildSettings = {
12811283
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
1284+
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
12821285
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
12831286
CLANG_WARN_BOOL_CONVERSION = YES;
12841287
CLANG_WARN_COMMA = YES;
@@ -1301,6 +1304,7 @@
13011304
DEAD_CODE_STRIPPING = YES;
13021305
ENABLE_STRICT_OBJC_MSGSEND = YES;
13031306
ENABLE_USER_SCRIPT_SANDBOXING = YES;
1307+
GCC_C_LANGUAGE_STANDARD = c17;
13041308
GCC_NO_COMMON_BLOCKS = YES;
13051309
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
13061310
GCC_WARN_ABOUT_RETURN_TYPE = YES;

0 commit comments

Comments
 (0)