https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120917
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Frank Heckenbach from comment #0) > Is that correct? (The message could really have been much clearer about > that.) Yes. > The problem is, I never asked for non-standard features. I ran g++-12 (and > previous versions) with "--std=c++23" (or respective versions) only, not > with any GNU extension flags (definitely never "-fconcepts" or > "-fconcepts-ts"), to avoid exactly these kinds of problems. Then you're doing it wrong, using -std=c++NN options has never disabled all extensions, and that is documented: When a base standard is specified, the compiler accepts all programs following that standard plus those using GNU extensions that do not contradict it. For example, -std=c90 turns off certain features of GCC that are incompatible with ISO C90, such as the "asm" and "typeof" keywords, but not other GNU extensions that do not have a meaning in ISO C90, such as omitting the middle term of a "?:" expression." This extension uses syntax which is not valid in C++20 so it does not conflict with the base standard, and is always enabled. You should have been using -pedantic if you wanted to diagnose all extensions: without this option, certain GNU extensions and traditional C and C++ features are supported as well. With this option, they are diagnosed (or rejected with -pedantic-errors). > In the assumption that this a part of standard concepts, I've used it in > many places in my code, and now GCC tells me it's not and the feature is > disappearing, is that right? yes > So basically GCC lured me into a trap, and the trap is snapping now, is it? No. You didn't read the manual and assumed something about -std=c++23 which has never been true. > Is there an alternative (apart from the manual boilerplate)? Even if it's an > evil macro, I don't care at this point. Just write the function template out: template<typename T> void f (S <T>); > Is there any chance the feature will be added to the standard sometime in > the future? No, I am not aware of any plans to propose it for the standard. > Even if not, could GCC please (re-)add this feature (of course, with an > explicit option this time), because of the special circumstances? I don't see any special circumstances.