public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "schaub.johannes at googlemail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/50921] New: GCC cannot find dependent conversion-function-id even if there's a using declaration for it Date: Sun, 30 Oct 2011 13:26:00 -0000 [thread overview] Message-ID: <bug-50921-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50921 Bug #: 50921 Summary: GCC cannot find dependent conversion-function-id even if there's a using declaration for it Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: schaub.johannes@googlemail.com The following code should compile but doesn't. ------- snip template<typename T> struct Type { int x; }; template<typename T> struct Base { operator Type<int>(); }; template<typename T> struct Derived : Base<T> { using Base<T>::operator Type<T>; void f() { int x = operator Type<T>().x; (void) x; } }; int main() { Derived<int> d; d.f(); } ------- snap Error: ------- snip main1.cpp:13:30: error: there are no arguments to 'operator Type<T>' that depend on a template parameter, so a declaration of 'operator Type<T>' must be available ------- snap The function call is dependent by the dependent function name itself, it doesn't need dependent call arguments in this case in order to be dependent.
next reply other threads:[~2011-10-30 13:26 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-10-30 13:26 schaub.johannes at googlemail dot com [this message] 2011-10-30 13:54 ` [Bug c++/50921] " schaub.johannes at googlemail dot com 2012-08-24 21:11 ` paolo.carlini at oracle dot com 2012-08-31 20:04 ` fabien at gcc dot gnu.org 2014-09-09 9:58 ` paolo.carlini at oracle dot com 2021-08-04 3:38 ` pinskia 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=bug-50921-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).