From 3c8233af085b128e9ae1fcd432ea824f64d5a45a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Holz?= Date: Mon, 29 Dec 2025 21:51:05 +0100 Subject: [PATCH] Everywhere: Move to C++26 --- Base/home/anon/Source/little/Makefile | 2 +- .../share/HackStudio/templates/cpp-basic.postcreate | 2 +- .../HackStudio/templates/cpp-library.postcreate | 2 +- CONTRIBUTING.md | 2 +- Documentation/BuildInstructions.md | 2 +- Documentation/BuildInstructionsLadybird.md | 2 +- Documentation/Links.md | 2 +- Documentation/NvimConfiguration.md | 2 +- Documentation/QtCreatorConfiguration.md | 2 +- Documentation/VSCodeConfiguration.md | 2 +- Meta/CMake/common_compile_options.cmake | 12 +++++++++++- Meta/gn/build/BUILD.gn | 7 +------ ...ke-Build-with-c-26-when-targeting-serenity.patch} | 6 +++--- Ports/OpenJDK/patches/ReadMe.md | 4 ++-- .../0001-Add-SerenityOS-platform-support.patch | 10 +++++----- .../0001-Add-SerenityOS-platform-support.patch | 10 +++++----- Ports/lite-xl/patches/ReadMe.md | 3 ++- .../patches/0001-Include-strings.h.patch | 2 +- Ports/milkytracker/patches/0002-Remove-OpenGL.patch | 2 +- ...dard-to-C-26-and-remove-some-unnecessary-s.patch} | 8 ++++---- ...-Link-against-the-needed-serenity-libraries.patch | 2 +- .../patches/0005-Replace-tmpnam-with-mkstemp.patch | 2 +- Ports/milkytracker/patches/ReadMe.md | 4 ++-- Ports/stpuzzles/package.sh | 2 +- .../0001-Add-support-for-Serenity-LibAudio.patch | 4 ++-- Tests/ClangPlugins/CMakeLists.txt | 2 +- 26 files changed, 53 insertions(+), 47 deletions(-) rename Ports/OpenJDK/patches/{0002-make-Build-with-c-23-when-targeting-serenity.patch => 0002-make-Build-with-c-26-when-targeting-serenity.patch} (95%) rename Ports/milkytracker/patches/{0003-Set-C-standard-to-C-20-and-remove-some-unnecessary-s.patch => 0003-Set-C-standard-to-C-26-and-remove-some-unnecessary-s.patch} (78%) diff --git a/Base/home/anon/Source/little/Makefile b/Base/home/anon/Source/little/Makefile index 7cb69aab702..1faba3f0ad5 100644 --- a/Base/home/anon/Source/little/Makefile +++ b/Base/home/anon/Source/little/Makefile @@ -1,6 +1,6 @@ PROGRAM = little OBJS = main.o other.o -CXXFLAGS = -g -std=c++23 +CXXFLAGS = -g -std=c++26 all: $(PROGRAM) diff --git a/Base/usr/share/HackStudio/templates/cpp-basic.postcreate b/Base/usr/share/HackStudio/templates/cpp-basic.postcreate index 30ade75a286..86bd2f80f43 100644 --- a/Base/usr/share/HackStudio/templates/cpp-basic.postcreate +++ b/Base/usr/share/HackStudio/templates/cpp-basic.postcreate @@ -3,7 +3,7 @@ echo > $2/Makefile <<-EOF PROGRAM = $1 OBJS = main.o -CXXFLAGS = -g -std=c++23 +CXXFLAGS = -g -std=c++26 all: \$(PROGRAM) diff --git a/Base/usr/share/HackStudio/templates/cpp-library.postcreate b/Base/usr/share/HackStudio/templates/cpp-library.postcreate index e1ab5d51d19..96586ce2049 100644 --- a/Base/usr/share/HackStudio/templates/cpp-library.postcreate +++ b/Base/usr/share/HackStudio/templates/cpp-library.postcreate @@ -12,7 +12,7 @@ sed -i "s/\\\$LibName/$3/g" $2/Class1.cpp echo > $2/Makefile <<-EOF LIBRARY = $1.so OBJS = Class1.o -CXXFLAGS = -g -std=c++23 +CXXFLAGS = -g -std=c++26 all: \$(LIBRARY) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e402ff457ac..bc5dfcb0db3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -43,7 +43,7 @@ Nobody is perfect, and sometimes we mess things up. That said, here are some goo **Do:** -- Write in idiomatic SerenityOS C++23, using the `AK` containers in all code. +- Write in idiomatic SerenityOS C++26, using the `AK` containers in all code. - Conform to the project coding style found in [CodingStyle.md](https://github.com/SerenityOS/serenity/blob/master/Documentation/CodingStyle.md). Use `clang-format` (version 20 or later) to automatically format C++ files. See [AdvancedBuildInstructions.md](https://github.com/SerenityOS/serenity/blob/master/Documentation/AdvancedBuildInstructions.md#clang-format-updates) for instructions on how to get an up-to-date version if your OS distribution does not ship clang-format-20. - Choose expressive variable, function and class names. Make it as obvious as possible what the code is doing. - Split your changes into separate, atomic commits (i.e. A commit per feature or fix, where the build, tests and the system are all functioning). diff --git a/Documentation/BuildInstructions.md b/Documentation/BuildInstructions.md index ed8bddb5fe7..c048c37748e 100644 --- a/Documentation/BuildInstructions.md +++ b/Documentation/BuildInstructions.md @@ -14,7 +14,7 @@ Optional: `fuse2fs` for [building images without root](https://github.com/Sereni #### GCC 14 or Clang 17+ -A host compiler that supports C++23 features is required for building host tools, the newer the better. Tested versions include gcc-14 and Clang 17 through 19. +A host compiler that supports C++26 features is required for building host tools, the newer the better. Tested versions include gcc-14 and Clang 17 through 19. On Ubuntu gcc-14 is available in the repositories of 24.04 (Noble) and later. If you are running an older version, you will either need to upgrade, or find an alternative installation source diff --git a/Documentation/BuildInstructionsLadybird.md b/Documentation/BuildInstructionsLadybird.md index 36b107a1d45..4d7df654011 100644 --- a/Documentation/BuildInstructionsLadybird.md +++ b/Documentation/BuildInstructionsLadybird.md @@ -5,7 +5,7 @@ ## Build Prerequisites -Qt6 development packages and a C++23 capable compiler are required. g++-14 or clang-17 are required at a minimum for c++23 support. +Qt6 development packages and a C++26 capable compiler are required. g++-14 or clang-17 are required at a minimum for c++26 support. On Debian/Ubuntu required packages include, but are not limited to: diff --git a/Documentation/Links.md b/Documentation/Links.md index 736196264d2..83de52b2e53 100644 --- a/Documentation/Links.md +++ b/Documentation/Links.md @@ -22,7 +22,7 @@ This is a roughly categorized list of pages relating to SerenityOS and its subpr - [Issues Found by OSS-Fuzz Continuous Fuzzing](https://bugs.chromium.org/p/oss-fuzz/issues/list?q=label:Proj-serenity) - [LibJS website](https://serenityos.github.io/libjs-website/) - [Try LibJS Online!](https://serenityos.github.io/libjs-website/repl/) -- [Compiler Explorer](https://serenity.godbolt.org/): Select "Lagom trunk" under "Libraries" and add the compiler option `-std=c++23` +- [Compiler Explorer](https://serenity.godbolt.org/): Select "Lagom trunk" under "Libraries" and add the compiler option `-std=c++26` ## Related Projects diff --git a/Documentation/NvimConfiguration.md b/Documentation/NvimConfiguration.md index a22998ef662..f097703a9ac 100644 --- a/Documentation/NvimConfiguration.md +++ b/Documentation/NvimConfiguration.md @@ -45,7 +45,7 @@ Use the following settings to ensure that coc-clangd works out of the box. ```json { - "clangd.fallbackFlags": ["-std=c++23"], + "clangd.fallbackFlags": ["-std=c++26"], "clangd.arguments": ["--query-driver=${workspaceFolder}/Toolchain/Local/**/*"], "semanticTokens.enable": true, "inlayHint.subSeparator": "︴", diff --git a/Documentation/QtCreatorConfiguration.md b/Documentation/QtCreatorConfiguration.md index ddd5ce439ae..687743d83e5 100644 --- a/Documentation/QtCreatorConfiguration.md +++ b/Documentation/QtCreatorConfiguration.md @@ -28,7 +28,7 @@ First, make sure you have a working toolchain and can build and run SerenityOS. If you're working on the Kernel, just uncomment `#define KERNEL`. -- Edit the `serenity.cxxflags` file to say `-std=c++23 -fsigned-char -fconcepts -fno-exceptions -fno-semantic-interposition -fPIC` +- Edit the `serenity.cxxflags` file to say `-std=c++26 -fsigned-char -fconcepts -fno-exceptions -fno-semantic-interposition -fPIC` - Edit the `serenity.includes` file to list the following lines: ``` ./ diff --git a/Documentation/VSCodeConfiguration.md b/Documentation/VSCodeConfiguration.md index a9d118433b5..835b2d0ebc2 100644 --- a/Documentation/VSCodeConfiguration.md +++ b/Documentation/VSCodeConfiguration.md @@ -53,7 +53,7 @@ following `c_cpp_properties.json` to circumvent some errors. Even with the confi "defines": ["DEBUG", "__serenity__"], "compilerPath": "${workspaceFolder}/Toolchain/Local/x86_64/bin/x86_64-pc-serenity-g++", "cStandard": "c17", - "cppStandard": "c++23", + "cppStandard": "c++26", "intelliSenseMode": "linux-gcc-x86", "compileCommands": "Build/x86_64/compile_commands.json", "compilerArgs": ["-Wall", "-Wextra", "-Werror"], diff --git a/Meta/CMake/common_compile_options.cmake b/Meta/CMake/common_compile_options.cmake index 1493174894e..9c4f58aad9d 100644 --- a/Meta/CMake/common_compile_options.cmake +++ b/Meta/CMake/common_compile_options.cmake @@ -1,5 +1,15 @@ # Flags shared by Lagom (including Ladybird) and Serenity. -set(CMAKE_CXX_STANDARD 23) + +# FIXME: Remove this once CMake knows that AppleClang understands -std=c++26. +# see https://gitlab.kitware.com/cmake/cmake/-/issues/27486 +if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") + set(CMAKE_CXX_STANDARD 23) + set(CMAKE_CXX23_STANDARD_COMPILE_OPTION "") + set(CMAKE_CXX_FLAGS "-std=c++26") +else() + set(CMAKE_CXX_STANDARD 26) +endif() + set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) diff --git a/Meta/gn/build/BUILD.gn b/Meta/gn/build/BUILD.gn index 69ca0de6fc6..1704068305d 100644 --- a/Meta/gn/build/BUILD.gn +++ b/Meta/gn/build/BUILD.gn @@ -99,12 +99,7 @@ config("compiler_defaults") { ldflags += [ "-Wl,--color-diagnostics" ] } - if (current_os == "mac") { - # FIXME: Use -std=c++23 once Xcode's clang supports that. - cflags_cc += [ "-std=c++2b" ] - } else { - cflags_cc += [ "-std=c++23" ] - } + cflags_cc += [ "-std=c++26" ] cflags_cc += [ "-fvisibility-inlines-hidden" ] diff --git a/Ports/OpenJDK/patches/0002-make-Build-with-c-23-when-targeting-serenity.patch b/Ports/OpenJDK/patches/0002-make-Build-with-c-26-when-targeting-serenity.patch similarity index 95% rename from Ports/OpenJDK/patches/0002-make-Build-with-c-23-when-targeting-serenity.patch rename to Ports/OpenJDK/patches/0002-make-Build-with-c-26-when-targeting-serenity.patch index d4ef73b1ada..cf3878233e8 100644 --- a/Ports/OpenJDK/patches/0002-make-Build-with-c-23-when-targeting-serenity.patch +++ b/Ports/OpenJDK/patches/0002-make-Build-with-c-26-when-targeting-serenity.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Sun, 12 Jun 2022 23:13:56 -0600 -Subject: [PATCH] make: Build with c++23 when targeting serenity +Subject: [PATCH] make: Build with c++26 when targeting serenity --- make/autoconf/flags-cflags.m4 | 8 ++++++-- @@ -12,7 +12,7 @@ Subject: [PATCH] make: Build with c++23 when targeting serenity 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4 -index 88679489fc09019212286e0cb75885a05103dc85..f1cf955434f65b8cecb00af9f600e93089bd5dd0 100644 +index 88679489fc09019212286e0cb75885a05103dc85..8222672a1dfe23d40225e631777d5b492a7c6d19 100644 --- a/make/autoconf/flags-cflags.m4 +++ b/make/autoconf/flags-cflags.m4 @@ -187,7 +187,8 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS], @@ -39,7 +39,7 @@ index 88679489fc09019212286e0cb75885a05103dc85..f1cf955434f65b8cecb00af9f600e930 AC_MSG_ERROR([Don't know how to enable C++14 for this toolchain]) fi + if test "x$OPENJDK_TARGET_OS" = xserenity; then -+ LANGSTD_CXXFLAGS="-std=c++23" ++ LANGSTD_CXXFLAGS="-std=c++26" + fi TOOLCHAIN_CFLAGS_JDK_CXXONLY="$TOOLCHAIN_CFLAGS_JDK_CXXONLY $LANGSTD_CXXFLAGS" TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM $LANGSTD_CXXFLAGS" diff --git a/Ports/OpenJDK/patches/ReadMe.md b/Ports/OpenJDK/patches/ReadMe.md index f8ce75daa7c..69ac43c03a4 100644 --- a/Ports/OpenJDK/patches/ReadMe.md +++ b/Ports/OpenJDK/patches/ReadMe.md @@ -5,9 +5,9 @@ make: Add Serenity support, masquerading as BSD when necessary -## `0002-make-Build-with-c-23-when-targeting-serenity.patch` +## `0002-make-Build-with-c-26-when-targeting-serenity.patch` -make: Build with c++23 when targeting serenity +make: Build with c++26 when targeting serenity ## `0003-make-Remove-CUPS-dependency.patch` diff --git a/Ports/SDL2/patches/0001-Add-SerenityOS-platform-support.patch b/Ports/SDL2/patches/0001-Add-SerenityOS-platform-support.patch index e039e1d29af..8a5dfcdfa9b 100644 --- a/Ports/SDL2/patches/0001-Add-SerenityOS-platform-support.patch +++ b/Ports/SDL2/patches/0001-Add-SerenityOS-platform-support.patch @@ -43,9 +43,9 @@ Co-Authored-By: sdomi src/video/serenity/SDL_serenitymessagebox.h | 38 + src/video/serenity/SDL_serenitymouse.cpp | 157 +++++ src/video/serenity/SDL_serenitymouse.h | 39 ++ - src/video/serenity/SDL_serenityvideo.cpp | 659 ++++++++++++++++++ + src/video/serenity/SDL_serenityvideo.cpp | 658 ++++++++++++++++++ src/video/serenity/SDL_serenityvideo.h | 101 +++ - 21 files changed, 1379 insertions(+), 28 deletions(-) + 21 files changed, 1378 insertions(+), 28 deletions(-) create mode 100644 src/audio/serenity/SDL_serenityaudio.cpp create mode 100644 src/audio/serenity/SDL_serenityaudio.h create mode 100644 src/video/serenity/SDL_serenityevents.cpp @@ -132,7 +132,7 @@ index 4aaae46f6f74428949f32922308f48bd1316e7c1..9491448493b88c7bd54e3fbfcb9e518d os=`echo "$os" | sed -e 's|sunos5|solaris2|'` ;; diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake -index ea4c0ff4300ea8dcffad6af9da57ac10d120bc04..172fc896e32902a947788ef11ac3dd67d49c62f4 100644 +index ea4c0ff4300ea8dcffad6af9da57ac10d120bc04..033037b4306efa5e9f463c890e4b25157ccb3208 100644 --- a/cmake/sdlchecks.cmake +++ b/cmake/sdlchecks.cmake @@ -809,6 +809,26 @@ macro(CheckDirectFB) @@ -148,7 +148,7 @@ index ea4c0ff4300ea8dcffad6af9da57ac10d120bc04..172fc896e32902a947788ef11ac3dd67 + set(HAVE_SDL_VIDEO TRUE) + set(HAVE_SDL_AUDIO TRUE) + -+ set(CMAKE_CXX_FLAGS "-std=c++23 -fno-exceptions ${CMAKE_CXX_FLAGS}") ++ set(CMAKE_CXX_FLAGS "-std=c++26 -fno-exceptions ${CMAKE_CXX_FLAGS}") + file(GLOB SERENITY_SOURCES ${SDL2_SOURCE_DIR}/src/video/serenity/*.cpp ${SDL2_SOURCE_DIR}/src/audio/serenity/*.cpp) + list(APPEND SOURCE_FILES ${SERENITY_SOURCES}) + set(SDL_VIDEO_DRIVER_SERENITY 1) @@ -910,7 +910,7 @@ index 0000000000000000000000000000000000000000..039f0361b3d1b248e218ea69495f58e5 +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/video/serenity/SDL_serenityvideo.cpp b/src/video/serenity/SDL_serenityvideo.cpp new file mode 100644 -index 0000000000000000000000000000000000000000..64f956a456730cfd99998566810c04df64a1bfa0 +index 0000000000000000000000000000000000000000..9299649cfa64e256c1cee8d138c49cb5fd68cbd8 --- /dev/null +++ b/src/video/serenity/SDL_serenityvideo.cpp @@ -0,0 +1,658 @@ diff --git a/Ports/lite-xl/patches/0001-Add-SerenityOS-platform-support.patch b/Ports/lite-xl/patches/0001-Add-SerenityOS-platform-support.patch index a7647f75c0c..97e2952007a 100644 --- a/Ports/lite-xl/patches/0001-Add-SerenityOS-platform-support.patch +++ b/Ports/lite-xl/patches/0001-Add-SerenityOS-platform-support.patch @@ -13,7 +13,7 @@ Signed-off-by: Jan200101 create mode 100644 src/api/dirmonitor/inodewatcher.cpp diff --git a/meson.build b/meson.build -index 3f88be37..70627782 100644 +index 3f88be37c3353869a7db127ccf44cdfcd181cd94..7782ecf9b8bbd4f5cc73f54e774b4afd48707369 100644 --- a/meson.build +++ b/meson.build @@ -4,7 +4,8 @@ project('lite-xl', @@ -22,13 +22,13 @@ index 3f88be37..70627782 100644 default_options : [ - 'c_std=gnu11' + 'c_std=gnu11', -+ 'cpp_std=c++20' ++ 'cpp_std=c++26' ] ) diff --git a/src/api/dirmonitor/inodewatcher.cpp b/src/api/dirmonitor/inodewatcher.cpp new file mode 100644 -index 00000000..e749f5bd +index 0000000000000000000000000000000000000000..e749f5bd8c5b16dd348f19bf9f5c450fbe0bf018 --- /dev/null +++ b/src/api/dirmonitor/inodewatcher.cpp @@ -0,0 +1,75 @@ @@ -108,7 +108,7 @@ index 00000000..e749f5bd + +int get_mode_dirmonitor() { return 2; } diff --git a/src/main.c b/src/main.c -index dca3cbd1..e11fb7ae 100644 +index dca3cbd1eb2990b9f1517a826022f07a21ec9ecb..e11fb7aeb428a38fb43e64cd76424c711c2bf9a5 100644 --- a/src/main.c +++ b/src/main.c @@ -9,7 +9,7 @@ @@ -140,7 +140,7 @@ index dca3cbd1..e11fb7ae 100644 #if !defined(ARCH_PROCESSOR) || !defined(ARCH_PLATFORM) diff --git a/src/meson.build b/src/meson.build -index a156ae3f..501914c8 100644 +index a156ae3f2582d195b6cce1e29c33002c9855238b..501914c8687c944a16a19fd229a843146ad4af18 100644 --- a/src/meson.build +++ b/src/meson.build @@ -11,20 +11,31 @@ lite_sources = [ diff --git a/Ports/lite-xl/patches/ReadMe.md b/Ports/lite-xl/patches/ReadMe.md index d9bee552d76..d5fd0caf912 100644 --- a/Ports/lite-xl/patches/ReadMe.md +++ b/Ports/lite-xl/patches/ReadMe.md @@ -1,7 +1,8 @@ -# Patches for Lite-XL on SerenityOS +# Patches for lite-xl on SerenityOS ## `0001-Add-SerenityOS-platform-support.patch` Add SerenityOS platform support +Signed-off-by: Jan200101 diff --git a/Ports/milkytracker/patches/0001-Include-strings.h.patch b/Ports/milkytracker/patches/0001-Include-strings.h.patch index aa5cf512b4b..3709921f07d 100644 --- a/Ports/milkytracker/patches/0001-Include-strings.h.patch +++ b/Ports/milkytracker/patches/0001-Include-strings.h.patch @@ -8,7 +8,7 @@ Subject: [PATCH] Include strings.h 1 file changed, 1 insertion(+) diff --git a/src/ppui/BasicTypes.h b/src/ppui/BasicTypes.h -index 20eba8b..e353345 100644 +index 20eba8bc79b10ca7cb5f9eb02678c5e493eb55f9..e353345fb0bd485bea10f45954f28ba8dfd3683c 100644 --- a/src/ppui/BasicTypes.h +++ b/src/ppui/BasicTypes.h @@ -30,6 +30,7 @@ typedef signed short pp_int16; diff --git a/Ports/milkytracker/patches/0002-Remove-OpenGL.patch b/Ports/milkytracker/patches/0002-Remove-OpenGL.patch index 7f84f695e6a..5fee7442859 100644 --- a/Ports/milkytracker/patches/0002-Remove-OpenGL.patch +++ b/Ports/milkytracker/patches/0002-Remove-OpenGL.patch @@ -8,7 +8,7 @@ Subject: [PATCH] Remove OpenGL 1 file changed, 2 insertions(+), 40 deletions(-) diff --git a/src/ppui/sdl/DisplayDevice_SDL.cpp b/src/ppui/sdl/DisplayDevice_SDL.cpp -index a4b966c..7ecedc7 100644 +index a4b966cff12fb73d73f970ac610e23bf9df604b0..7ecedc7a369cd862a0e6bd1a9221ff12252e1da1 100644 --- a/src/ppui/sdl/DisplayDevice_SDL.cpp +++ b/src/ppui/sdl/DisplayDevice_SDL.cpp @@ -26,30 +26,8 @@ diff --git a/Ports/milkytracker/patches/0003-Set-C-standard-to-C-20-and-remove-some-unnecessary-s.patch b/Ports/milkytracker/patches/0003-Set-C-standard-to-C-26-and-remove-some-unnecessary-s.patch similarity index 78% rename from Ports/milkytracker/patches/0003-Set-C-standard-to-C-20-and-remove-some-unnecessary-s.patch rename to Ports/milkytracker/patches/0003-Set-C-standard-to-C-26-and-remove-some-unnecessary-s.patch index d3fd713b69d..af277fc57a6 100644 --- a/Ports/milkytracker/patches/0003-Set-C-standard-to-C-20-and-remove-some-unnecessary-s.patch +++ b/Ports/milkytracker/patches/0003-Set-C-standard-to-C-26-and-remove-some-unnecessary-s.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: "jake.westrip" Date: Tue, 27 Apr 2021 18:34:53 +1000 -Subject: [PATCH] Set C++ standard to C++20 and remove some unnecessary +Subject: [PATCH] Set C++ standard to C++26 and remove some unnecessary subdirectories --- @@ -9,7 +9,7 @@ Subject: [PATCH] Set C++ standard to C++20 and remove some unnecessary 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4bdecf1..a64b843 100644 +index 4bdecf1b51d6ab14865dd242c98531bbc4d0ebb8..2e7f4339fd056b1bc0f3bd10c1397ce15d77b92b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,8 +22,8 @@ @@ -18,8 +18,8 @@ index 4bdecf1..a64b843 100644 -# Set C++ standard to C++98 -set(CMAKE_CXX_STANDARD 98) -+# Set C++ standard to C++20 -+set(CMAKE_CXX_STANDARD 20) ++# Set C++ standard to C++26 ++set(CMAKE_CXX_STANDARD 26) set(CMAKE_CXX_EXTENSIONS OFF) # Enable IDE solution folders diff --git a/Ports/milkytracker/patches/0004-Link-against-the-needed-serenity-libraries.patch b/Ports/milkytracker/patches/0004-Link-against-the-needed-serenity-libraries.patch index 1e3ed334c75..76fde57d5c8 100644 --- a/Ports/milkytracker/patches/0004-Link-against-the-needed-serenity-libraries.patch +++ b/Ports/milkytracker/patches/0004-Link-against-the-needed-serenity-libraries.patch @@ -8,7 +8,7 @@ Subject: [PATCH] Link against the needed serenity libraries 1 file changed, 3 insertions(+) diff --git a/src/tracker/CMakeLists.txt b/src/tracker/CMakeLists.txt -index f4243a0..02f67c0 100644 +index f4243a0fff9a462c68add0f6f5e11d956546f93e..02f67c087a4c60a168fdab74f1d9c8f52f340618 100644 --- a/src/tracker/CMakeLists.txt +++ b/src/tracker/CMakeLists.txt @@ -374,4 +374,7 @@ else() diff --git a/Ports/milkytracker/patches/0005-Replace-tmpnam-with-mkstemp.patch b/Ports/milkytracker/patches/0005-Replace-tmpnam-with-mkstemp.patch index 805e3706f18..5c24b067636 100644 --- a/Ports/milkytracker/patches/0005-Replace-tmpnam-with-mkstemp.patch +++ b/Ports/milkytracker/patches/0005-Replace-tmpnam-with-mkstemp.patch @@ -8,7 +8,7 @@ Subject: [PATCH] Replace tmpnam with mkstemp 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ppui/osinterface/posix/PPSystem_POSIX.cpp b/src/ppui/osinterface/posix/PPSystem_POSIX.cpp -index 9b84cfe..03b22b4 100644 +index 9b84cfe6e2b3087df8f1215b9ba348f8d30c9b4b..03b22b4834a06b96de644db0bf4ab6de83e01e03 100644 --- a/src/ppui/osinterface/posix/PPSystem_POSIX.cpp +++ b/src/ppui/osinterface/posix/PPSystem_POSIX.cpp @@ -67,7 +67,7 @@ const SYSCHAR* System::getTempFileName() diff --git a/Ports/milkytracker/patches/ReadMe.md b/Ports/milkytracker/patches/ReadMe.md index eb478a576da..96e51ab770d 100644 --- a/Ports/milkytracker/patches/ReadMe.md +++ b/Ports/milkytracker/patches/ReadMe.md @@ -10,9 +10,9 @@ Include strings.h Remove OpenGL -## `0003-Set-C-standard-to-C-20-and-remove-some-unnecessary-s.patch` +## `0003-Set-C-standard-to-C-26-and-remove-some-unnecessary-s.patch` -Set C++ standard to C++20 and remove some unnecessary subdirectories +Set C++ standard to C++26 and remove some unnecessary subdirectories ## `0004-Link-against-the-needed-serenity-libraries.patch` diff --git a/Ports/stpuzzles/package.sh b/Ports/stpuzzles/package.sh index f4bbc5bb62c..e3572554146 100755 --- a/Ports/stpuzzles/package.sh +++ b/Ports/stpuzzles/package.sh @@ -9,7 +9,7 @@ files=( ) configure() { - run cmake "${configopts[@]}" -DCMAKE_CXX_FLAGS="-std=c++23 -O2" + run cmake "${configopts[@]}" -DCMAKE_CXX_FLAGS="-std=c++26 -O2" } install() { diff --git a/Ports/xmp-cli/patches/0001-Add-support-for-Serenity-LibAudio.patch b/Ports/xmp-cli/patches/0001-Add-support-for-Serenity-LibAudio.patch index d88dd69ed5a..d4a0bfbcdb9 100644 --- a/Ports/xmp-cli/patches/0001-Add-support-for-Serenity-LibAudio.patch +++ b/Ports/xmp-cli/patches/0001-Add-support-for-Serenity-LibAudio.patch @@ -13,14 +13,14 @@ Subject: [PATCH] Add support for Serenity LibAudio create mode 100644 src/sound_serenity.cpp diff --git a/src/Makefile.am b/src/Makefile.am -index b65eb85244acec722b2f240976f184f06db11a27..6745ed1d04cde08b9811781c2bfe552d488a6a82 100644 +index b65eb85244acec722b2f240976f184f06db11a27..489085a024711f42722247196532a7c428aeb268 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,6 +2,7 @@ AM_CPPFLAGS = -DSYSCONFDIR=\"${sysconfdir}/${PACKAGE_NAME}\" ${LIBXMP_CFLAGS} \ ${alsa_CFLAGS} ${pulseaudio_CFLAGS} -+AM_CXXFLAGS = -std=c++23 -fno-exceptions ++AM_CXXFLAGS = -std=c++26 -fno-exceptions AM_CFLAGS = -Wall bin_PROGRAMS = xmp diff --git a/Tests/ClangPlugins/CMakeLists.txt b/Tests/ClangPlugins/CMakeLists.txt index 88dee4b4d73..c51b59f5f9f 100644 --- a/Tests/ClangPlugins/CMakeLists.txt +++ b/Tests/ClangPlugins/CMakeLists.txt @@ -4,7 +4,7 @@ include(AddLLVM) find_package(Python3 REQUIRED COMPONENTS Interpreter) get_property(CLANG_PLUGINS_COMPILE_OPTIONS_FOR_TESTS GLOBAL PROPERTY CLANG_PLUGINS_COMPILE_OPTIONS_FOR_TESTS) -list(APPEND CLANG_PLUGINS_COMPILE_OPTIONS_FOR_TESTS -std=c++23 -Wno-user-defined-literals -Wno-literal-range) +list(APPEND CLANG_PLUGINS_COMPILE_OPTIONS_FOR_TESTS -std=c++26 -Wno-user-defined-literals -Wno-literal-range) # Ensure we always check for invalid function field types regardless of the value of ENABLE_CLANG_PLUGINS_INVALID_FUNCTION_MEMBERS list(APPEND CLANG_PLUGINS_COMPILE_OPTIONS_FOR_TESTS -fplugin-arg-libjs_gc_scanner-detect-invalid-function-members)