https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95651
noan at email dot com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |RESOLVED Resolution|--- |INVALID --- Comment #2 from noan at email dot com --- This is my bad. I ran the following: apt install gcc clang This installed gcc, clang and clang++ but not g++. Thus, GCC was compiled with clang++ which doesn't work. The code compiles when g++ is installed.