On Sun, 22 Feb 2026 at 09:45 +0100, Ingo Saitz wrote:
To use "import std;", one needs to generate a precompiled std.gcm file
first.
You can also just use --compile-std-module to avoid that step.
Doing this with -std=c++26 is currently broken:
$ g++-16 -std=c++26 -g3 -O3 -fmodules -fsearch-include-path -c bits/std.cc -o
/dev/null
/usr/include/c++/16/bits/std.cc:1918:14: error: ‘submdspan_canonicalize_slices’
has not been declared in ‘std’
1918 | using std::submdspan_canonicalize_slices;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/16/bits/std.cc:1919:14: error: ‘submdspan_extents’ has not
been declared in ‘std’
1919 | using std::submdspan_extents;
| ^~~~~~~~~~~~~~~~~
It does still work with -std=c++20 and c++23, though. This is probably a
minor issue until c++26 is released.
This was already fixed upstream:
https://gcc.gnu.org/r16-7546-gf037fdeb95bb2b