[Bug c++/48531] [C++0x][SFINAE] Hard errors with arrays of unknown bound
daniel.kruegler at googlemail dot com
gcc-bugzilla@gcc.gnu.org
Mon Apr 18 11:13:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48531
--- Comment #9 from Daniel Krügler <daniel.kruegler at googlemail dot com> 2011-04-18 11:12:14 UTC ---
(In reply to comment #8)
> Thanks. But I'm confused by what is replacing the hard-error. Isn't this
> supposed to be well-formed?
>
> template<class T,
> class = decltype(T())
> >
> char f(int);
>
> template<class>
> double f(...);
>
> static_assert(sizeof(f<int[1]>(0)) == 1, "Error");
Yes, this is supposed to be well-formed. I have not checked the most recent gcc
state yet (but will do this evening), is this code not accepted?
More information about the Gcc-bugs
mailing list