public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "sebor at roguewave dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/27402] New: error on SFINAE Date: Tue, 02 May 2006 20:59:00 -0000 [thread overview] Message-ID: <bug-27402-1186@http.gcc.gnu.org/bugzilla/> (raw) I believe the program below is well-formed (the latest EDG eccp 3.7 concurs), but gcc 4.1.0 rejects it. $ cat t.cpp && gcc --version && gcc t.cpp template <int> struct A { typedef int I; }; struct X { }; template <class T> struct B { typedef typename T::J J; }; template <class T> struct B<T*> { typedef X J; }; template <class T> typename A<T () | T ()>::I foo (T) { return 0; } template <class T> typename B<T>::J foo (T) { return typename B<T>::J (); } int main () { foo (""); } gcc (GCC) 4.1.0 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. t.cpp: In function 'int main()': t.cpp:15: error: invalid operands of types 'const char*' and 'const char*' to binary 'operator|' -- Summary: error on SFINAE Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: sebor at roguewave dot com GCC build triplet: sparc-sun-solaris2.9 GCC host triplet: sparc-sun-solaris2.9 GCC target triplet: sparc-sun-solaris2.9 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27402
next reply other threads:[~2006-05-02 20:59 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-05-02 20:59 sebor at roguewave dot com [this message] 2006-05-02 22:05 ` [Bug c++/27402] " pinskia at gcc dot gnu dot org 2009-11-21 19:16 ` paolo dot carlini at oracle dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-27402-1186@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).