This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/49051] [C++0x] Doesn't SFINAE away an invalid substitution into toplevel parameter type "T[N]"


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49051

--- Comment #5 from Johannes Schaub <schaub.johannes at googlemail dot com> 2011-06-26 13:40:34 UTC ---
(In reply to comment #4)
> Hmm, the example in 14.8.2p8 does seem to contradict my interpretation of the
> normative wording.  I'll raise this with core.

A related question, if in the end we in fact don't SFINAE or error out with
"T[N]" is, whether substitution for "N" is done at all. Because the type would
be "T*", not "T[N]" anymore. 

    template<typename T>
    void f(char[T::size]);

    int main() { f<int>(); }

Does the substitution succeed?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]