https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19501
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- For the first case, GCC 11 accepts it finally. For the second case, GCC 11 accepts it only for -std=c++20 . clang accepts both cases even for -std=c++98.