public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "zackw at panix dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/50595] New: template overload resolution insufficiently sensitive to name dependency? Date: Mon, 03 Oct 2011 04:14:00 -0000 [thread overview] Message-ID: <bug-50595-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50595 Bug #: 50595 Summary: template overload resolution insufficiently sensitive to name dependency? Classification: Unclassified Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: zackw@panix.com Created attachment 25401 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25401 test case Per http://stackoverflow.com/questions/7630806 the expected output of the attached test case should be f(char): 1 f(int): T(1) f(int): t f(char): 1 f(char): T(1) f(char): t since the second and third calls to f() in g() have arguments that are template-dependent, so resolution of *those* function calls (but not the first call) should be deferred until the point of instantiation (h()), at which time both f(int) and f(char) are visible. What actually happens with g++ 4.6 is f(char): 1 f(char): T(1) f(char): t f(char): 1 f(char): T(1) f(char): t I'm not 100% convinced by the argument above, but I am convinced enough to see what y'all think.
next reply other threads:[~2011-10-03 4:14 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-10-03 4:14 zackw at panix dot com [this message] 2011-10-03 10:05 ` [Bug c++/50595] " paolo.carlini at oracle dot com 2014-08-13 13:36 ` zackw at panix 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-50595-4@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).