https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63217
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=85250
Last reconfirmed|2017-01-08 00:00:00 |2021-8-9
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Here is a C++98 version which shows this has always been rejected (well at
least since 4.1.2):
struct foo {
template<class T>
operator const T & () { static T t =0; return t;}
};
int t = foo();