Skip to content

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

Merged
Ericson2314 merged 1 commit intoNixOS:masterfrom
xokdvium:c++23
Aug 19, 2025
Merged

treewide: Bump C++ standard version to C++23#13793
Ericson2314 merged 1 commit intoNixOS:masterfrom
xokdvium:c++23

Conversation

@xokdvium
Copy link
Contributor

Motivation

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.

Context


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

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.
@xokdvium xokdvium requested review from Mic92 and roberth August 19, 2025 12:55
@github-actions github-actions bot added documentation new-cli Relating to the "nix" command with-tests Issues related to testing. PRs with tests have some priority fetching Networking with the outside (non-Nix) world, input locking c api Nix as a C library with a stable interface labels Aug 19, 2025
@Mic92
Copy link
Member

Mic92 commented Aug 19, 2025

Feature list: https://en.wikipedia.org/wiki/C%2B%2B23

@Mic92
Copy link
Member

Mic92 commented Aug 19, 2025

What minimum clang/gcc versions would this mean?

@xokdvium
Copy link
Contributor Author

What minimum clang/gcc versions would this mean?

This depends on the features we'd want to use. deducing this is available since Clang 19 and GCC 14 (what we already have in 25.05), so I guess it's pretty safe to start requiring this.

@Mic92
Copy link
Member

Mic92 commented Aug 19, 2025

Linux Distributions with Clang 19 and GCC 14 in Main Repos

  • Arch Linux - Both Clang 19 and GCC 14 in [extra]/[core] repos
  • openSUSE Tumbleweed (rolling) - GCC 14 and Clang 19 in main repos
  • openSUSE Leap 15.6 (stable) - GCC 7 default, GCC 8-14 available (Development Tools Module)
  • Fedora 40/41 - GCC 14 in main repo (Clang 19 requires LLVM repo)
  • Ubuntu 25.04 (non-LTS) - GCC 14 default, LLVM 20 in main (Clang 19 via LLVM repo)
  • Ubuntu 24.04 (LTS) - Neither in main repo (requires external repos)
  • Debian Sid (unstable) - GCC 14 in main repo (Clang 19 requires LLVM repo)
  • Debian 12 (Bookworm/stable) - GCC 12 and Clang 14 in main repo
  • FreeBSD 14 - Clang 16/17 in base, GCC 14 and Clang 19 available in ports (lang/gcc14, devel/llvm19)

@Mic92
Copy link
Member

Mic92 commented Aug 19, 2025

So looks like distributions should be covered.

@Ericson2314 Ericson2314 merged commit a92a996 into NixOS:master Aug 19, 2025
14 checks passed
@xokdvium xokdvium deleted the c++23 branch August 19, 2025 16:39
ysndr added a commit to flox/flox that referenced this pull request Nov 6, 2025
ysndr added a commit to flox/flox that referenced this pull request Nov 6, 2025
ysndr added a commit to flox/flox that referenced this pull request Nov 6, 2025
ysndr added a commit to flox/flox that referenced this pull request Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c api Nix as a C library with a stable interface documentation fetching Networking with the outside (non-Nix) world, input locking new-cli Relating to the "nix" command with-tests Issues related to testing. PRs with tests have some priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants