https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105606
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Note clang also rejects it for -std=c++20 and accepts it for -std=c++17. Let me dig into the changes, I suspect this is another standard change.