treewide: Bump C++ standard version to C++23

Compilers in nixpkgs have caught up and major distros
should also have recent enough compilers. It would be
nice to have newer features like more full featured
ranges and deducing this.
This commit is contained in:
Sergei Zimmerman
2025-08-17 22:41:57 +03:00
parent f3bd18f2b4
commit 03101cc839
31 changed files with 33 additions and 27 deletions

View File

@@ -10,7 +10,7 @@
- Bash Shell. The `./configure` script relies on bashisms, so Bash is
required.
- A version of GCC or Clang that supports C++20.
- A version of GCC or Clang that supports C++23.
- `pkg-config` to locate dependencies. If your distribution does not
provide it, you can get it from

View File

@@ -14,7 +14,7 @@ extra_pkg_config_variables = get_variable('extra_pkg_config_variables', {})
extra_cflags = []
if not meson.project_name().endswith('-c')
extra_cflags += [ '-std=c++2a' ]
extra_cflags += [ '-std=c++23' ]
endif
import('pkgconfig').generate(
@@ -34,7 +34,7 @@ meson.override_dependency(
declare_dependency(
include_directories : include_dirs,
link_with : this_library,
compile_args : [ '-std=c++2a' ],
compile_args : [ '-std=c++23' ],
dependencies : deps_public_subproject + deps_public,
variables : extra_pkg_config_variables,
),

View File

@@ -3,7 +3,7 @@ project(
'cpp',
version : files('.version'),
default_options : [
'cpp_std=c++2a',
'cpp_std=c++23',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'errorlogs=true', # Please print logs for tests that fail

View File

@@ -3,7 +3,7 @@ project(
'cpp',
version : files('.version'),
default_options : [
'cpp_std=c++2a',
'cpp_std=c++23',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'errorlogs=true', # Please print logs for tests that fail

View File

@@ -3,7 +3,7 @@ project(
'cpp',
version : files('.version'),
default_options : [
'cpp_std=c++2a',
'cpp_std=c++23',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'errorlogs=true', # Please print logs for tests that fail

View File

@@ -1,3 +1,4 @@
#include <exception> // Needed by rapidcheck on Darwin
#include <rapidcheck.h>
#include "nix/store/tests/path.hh"

View File

@@ -1,5 +1,6 @@
#include <nlohmann/json.hpp>
#include <gtest/gtest.h>
#include <exception> // Needed by rapidcheck on Darwin
#include <rapidcheck/gtest.h>
#include "nix/store/tests/derived-path.hh"

View File

@@ -3,7 +3,7 @@ project(
'cpp',
version : files('.version'),
default_options : [
'cpp_std=c++2a',
'cpp_std=c++23',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'errorlogs=true', # Please print logs for tests that fail

View File

@@ -3,7 +3,7 @@ project(
'cpp',
version : files('.version'),
default_options : [
'cpp_std=c++2a',
'cpp_std=c++23',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'errorlogs=true', # Please print logs for tests that fail

View File

@@ -3,7 +3,7 @@ project(
'cpp',
version : files('.version'),
default_options : [
'cpp_std=c++2a',
'cpp_std=c++23',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'errorlogs=true', # Please print logs for tests that fail

View File

@@ -3,7 +3,7 @@ project(
'cpp',
version : files('.version'),
default_options : [
'cpp_std=c++2a',
'cpp_std=c++23',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'errorlogs=true', # Please print logs for tests that fail

View File

@@ -3,7 +3,7 @@ project(
'cpp',
version : files('.version'),
default_options : [
'cpp_std=c++2a',
'cpp_std=c++23',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'errorlogs=true', # Please print logs for tests that fail

View File

@@ -3,7 +3,7 @@ project(
'cpp',
version : files('.version'),
default_options : [
'cpp_std=c++2a',
'cpp_std=c++23',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'errorlogs=true', # Please print logs for tests that fail

View File

@@ -3,7 +3,7 @@ project(
'cpp',
version : files('.version'),
default_options : [
'cpp_std=c++2a',
'cpp_std=c++23',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'errorlogs=true', # Please print logs for tests that fail

View File

@@ -3,7 +3,7 @@ project(
'cpp',
version : files('.version'),
default_options : [
'cpp_std=c++2a',
'cpp_std=c++23',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'errorlogs=true', # Please print logs for tests that fail

View File

@@ -3,7 +3,7 @@ project(
'cpp',
version : files('.version'),
default_options : [
'cpp_std=c++2a',
'cpp_std=c++23',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'errorlogs=true', # Please print logs for tests that fail

View File

@@ -3,7 +3,7 @@ project(
'cpp',
version : files('.version'),
default_options : [
'cpp_std=c++2a',
'cpp_std=c++23',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'errorlogs=true', # Please print logs for tests that fail

View File

@@ -3,7 +3,7 @@ project(
'cpp',
version : files('.version'),
default_options : [
'cpp_std=c++2a',
'cpp_std=c++23',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'errorlogs=true', # Please print logs for tests that fail

View File

@@ -1,5 +1,6 @@
#include <regex>
#include <exception> // Needed by rapidcheck on Darwin
#include <rapidcheck.h>
#include "nix/store/tests/derived-path.hh"

View File

@@ -1,6 +1,7 @@
#pragma once
///@file
#include <exception> // Needed by rapidcheck on Darwin
#include <rapidcheck/gen/Arbitrary.h>
#include "nix/store/outputs-spec.hh"

View File

@@ -3,7 +3,7 @@ project(
'cpp',
version : files('.version'),
default_options : [
'cpp_std=c++2a',
'cpp_std=c++23',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'errorlogs=true', # Please print logs for tests that fail

View File

@@ -1,6 +1,7 @@
#include <rapidcheck/gen/Arbitrary.h>
#include <exception> // Needed by rapidcheck on Darwin
#include <regex>
#include <rapidcheck/gen/Arbitrary.h>
#include <rapidcheck.h>
#include "nix/store/path-regex.hh"

View File

@@ -3,7 +3,7 @@ project(
'cpp',
version : files('.version'),
default_options : [
'cpp_std=c++2a',
'cpp_std=c++23',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'errorlogs=true', # Please print logs for tests that fail

View File

@@ -3,7 +3,7 @@ project(
'cpp',
version : files('.version'),
default_options : [
'cpp_std=c++2a',
'cpp_std=c++23',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'errorlogs=true', # Please print logs for tests that fail

View File

@@ -3,7 +3,7 @@ project(
'cpp',
version : files('.version'),
default_options : [
'cpp_std=c++2a',
'cpp_std=c++23',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'errorlogs=true', # Please print logs for tests that fail

View File

@@ -1,5 +1,6 @@
#include <regex>
#include <exception> // Needed by rapidcheck on Darwin
#include <rapidcheck.h>
#include "nix/util/hash.hh"

View File

@@ -3,7 +3,7 @@ project(
'cpp',
version : files('.version'),
default_options : [
'cpp_std=c++2a',
'cpp_std=c++23',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'errorlogs=true', # Please print logs for tests that fail

View File

@@ -3,7 +3,7 @@ project(
'cpp',
version : files('.version'),
default_options : [
'cpp_std=c++2a',
'cpp_std=c++23',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'errorlogs=true', # Please print logs for tests that fail

View File

@@ -3,7 +3,7 @@ project(
'cpp',
version : files('.version'),
default_options : [
'cpp_std=c++2a',
'cpp_std=c++23',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'errorlogs=true', # Please print logs for tests that fail

View File

@@ -3,7 +3,7 @@ project(
'cpp',
version : files('.version'),
default_options : [
'cpp_std=c++2a',
'cpp_std=c++23',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'errorlogs=true', # Please print logs for tests that fail

View File

@@ -2,7 +2,7 @@ project(
'nix-functional-tests',
version : files('.version'),
default_options : [
'cpp_std=c++2a',
'cpp_std=c++23',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'errorlogs=true', # Please print logs for tests that fail