[Bug c++/65072] Segfault when parsing dectlype in trailing return type
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Mar 17 19:08:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65072
--- Comment #6 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
And clang accepts it.
It looks like we don't need the C<> around decltype:
template <typename> class C
{
struct
{
int i;
};
auto operator*(const C m) -> decltype (m.i);
};
void fn1 (const C<float>);
C<float> a;
This one is accepted by clang, gcc 5/4.9/4.8 ICE.
More information about the Gcc-bugs
mailing list