[Bug c++/94628] [8/9/10 Regression] ICE in invalid_nonstatic_memfn_p at cp/typeck.c:1979 since r9-640-g1268ecc26fc1289b
ppalka at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Apr 18 14:42:21 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94628
--- Comment #4 from Patrick Palka <ppalka at gcc dot gnu.org> ---
(In reply to Patrick Palka from comment #3)
> Reduced rejects-valid testcase:
>
> int f(int, int);
> int f(int);
>
> template<class...Args>
> auto select(Args... args) -> decltype(f(args...))
> {
> if constexpr(sizeof...(Args)>1)
> return select<char>(7);
> else
> return 0;
> }
>
> int a = select(0, 1);
>
>
>
> Replace 'args...' with 'decltype(args){}' to make it ICE-on-valid.
Oops, that should say 'decltype(args){}...'
More information about the Gcc-bugs
mailing list