public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/12672] Evals template defaults args that it should not Date: Sat, 18 Oct 2003 19:50:00 -0000 [thread overview] Message-ID: <20031018194725.24072.qmail@sources.redhat.com> (raw) In-Reply-To: <20031018082407.12672.igodard@pacbell.net> PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12672 bangerth at dealii dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed| |1 Last reconfirmed|0000-00-00 00:00:00 |2003-10-18 19:47:24 date| | ------- Additional Comments From bangerth at dealii dot org 2003-10-18 19:47 ------- Confirmed. Here's something even shorter: --------------------------- template <typename T> struct S { typedef typename T::type type; }; template<typename U, typename V = typename S<U>::type> struct A {}; template<typename T> A<T> Foo(T); template<typename T> void Foo(T, T); int main() { Foo<int>(1, 2); } ---------------------------- This fails to compile because the compiler tries to instantiate the return type of the first Foo function. Whether that is actually taken is irrelevant here, since we are only doing name lookup at this stage, but we shouldn't error out: this is a SFINAE failure and should just remove the first Foo function from the list of candidates. It shouldn't be an error. I confirm this for 3.3 and 3.4 builds from 2003-09-19, since this is the latest I presently have. They both say g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc x.cc: In instantiation of `S<int>': x.cc:12: instantiated from here x.cc:2: error: `int' is not a class, struct, or union type What startles me a bit is that icc7 also shows the error. I am pretty sure, though, that this is in error as well. W.
next prev parent reply other threads:[~2003-10-18 19:47 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-10-18 8:24 [Bug c++/12672] New: " igodard at pacbell dot net 2003-10-18 8:26 ` [Bug c++/12672] " igodard at pacbell dot net 2003-10-18 11:28 ` igodard at pacbell dot net 2003-10-18 16:19 ` pinskia at gcc dot gnu dot org 2003-10-18 19:50 ` bangerth at dealii dot org [this message] 2003-12-28 22:13 ` pinskia at gcc dot gnu dot org [not found] <bug-12672-6594@http.gcc.gnu.org/bugzilla/> 2009-04-16 17:02 ` igodard at pacbell dot net [not found] <bug-12672-4@http.gcc.gnu.org/bugzilla/> 2021-08-25 20:49 ` ppalka at gcc dot gnu.org 2021-08-31 17:31 ` cvs-commit at gcc dot gnu.org 2021-09-13 15:09 ` ppalka at gcc dot gnu.org
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=20031018194725.24072.qmail@sources.redhat.com \ --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).