[Bug c++/102338] Recursive noexcept specification inside class/struct
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Sep 15 07:47:45 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102338
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #5)
> here is a more reduced testcase:
> struct S {
> template<typename T>
> int f(T && t) noexcept {
> return 0;
> }
> template<typename T, typename... Ts>
> int f(T && t, Ts && ... ts) noexcept(noexcept(f(ts...))) {
> return f(ts...);
> }
> };
>
> bool t = S{}.f(true, 0, 5u);
>
> If this was not a struct, the code would be invalid as the recusive f is not
> found.
Oh the non-static case never compiled either.
More information about the Gcc-bugs
mailing list