https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123819

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
s/T P/const char *P/ above.
On the other side
S <&as[1]> c;
is accepted.
Anyway, seems I was wrong about clang++, it rejects both S <&as + 1> and S
<&as> in -std=c++17 mode and in -std=c++20 mode for clang++ < 18, but in 18+ it
accepts it with -std=c++20.
https://eel.is/c++draft/temp.arg.nontype#6 says it is invalid to refer to
subobjects of the named cases but a normal variable is not among those.

Reply via email to