Skip to content

Commit f9956fa

Browse files
committed
C++26 support: build flags, headers, parser features
Build: - CppBuild.java: -std=c++20 -> -std=c++2c (GCC C++26 draft flag) - generate_plugandplay.py: -std=c++17 -> -std=c++2c throughout - generate_cmake.py: CMAKE_CXX_STANDARD 17 -> 26 Processing.h: - C++23 headers: <expected>, <flat_map>, <flat_set>, <generator>, <print>, <spanstream>, <stacktrace> guarded by __cplusplus >= 202302L - C++26 headers: <inplace_vector>, <function_ref>, <hazard_pointer> guarded by __has_include and __cplusplus > 202302L Parser: - if consteval: C++23 immediate-function context check now parsed; emitted as if constexpr(true) for runtime compatibility - = delete("reason"): C++26 optional string message on deleted functions now consumed CppBuild: - C++23/26 using declarations added to generated preamble: std::expected, std::unexpected, std::print, std::println, std::inplace_vector (all guarded by __cplusplus version checks)
1 parent f761fcb commit f9956fa

25 files changed

Lines changed: 18747 additions & 30333 deletions

dist/processing-cpp-cmake.zip

3.38 KB
Binary file not shown.
3.36 KB
Binary file not shown.

mode/CppMode.jar

179 Bytes
Binary file not shown.

processing_test.js

Lines changed: 0 additions & 1669 deletions
This file was deleted.

processing_test.wasm

-17 KB
Binary file not shown.

scripts/generate_cmake.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ def generate(out_dir: Path) -> None:
297297
# scripts/generate_cmake.py. Don't hand-edit a copy of this folder;
298298
# re-run that script instead.
299299
300-
set(CMAKE_CXX_STANDARD 17)
300+
set(CMAKE_CXX_STANDARD 26)
301301
set(CMAKE_CXX_STANDARD_REQUIRED ON)
302302
303303
# Needed early -- CMAKE_INSTALL_INCLUDEDIR (used a few lines down, in
@@ -321,7 +321,7 @@ def generate(out_dir: Path) -> None:
321321
PROCESSING_HAS_STB_TRUETYPE
322322
)
323323
324-
target_compile_features(processing_cpp PUBLIC cxx_std_17)
324+
target_compile_features(processing_cpp PUBLIC cxx_std_26)
325325
326326
option(PROCESSING_CPP_FETCH_DEPS "Build GLFW/GLEW from source if missing" OFF)
327327

0 commit comments

Comments
 (0)