[Bug c++/102338] Recursive noexcept specification inside class/struct
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Sep 15 07:50:02 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102338
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note clang is borken in a different way, take:
struct S {
template<typename T>
int f(T && t) noexcept {
return 0;
}
template<typename T, typename... Ts>
static int f(T && t, Ts && ... ts) noexcept(noexcept(f(ts...))) {
return f(ts...);
}
};
//int t = S{}.f(true, 0, 5u);
bool t1 = noexcept(S{}.f(true, 0, 5u));
Definitely should not compile.
More information about the Gcc-bugs
mailing list