public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: antoine.de-maricourt@m4x.org To: gcc-gnats@gcc.gnu.org Subject: c++/5193: Problem with nested templates instanciation Date: Tue, 25 Dec 2001 17:16:00 -0000 [thread overview] Message-ID: <20011226011122.21428.qmail@sources.redhat.com> (raw) >Number: 5193 >Category: c++ >Synopsis: Problem with nested templates instanciation >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Tue Dec 25 17:16:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: A. de Maricourt >Release: 3.0.3 >Organization: >Environment: i386-linux >Description: xx.cc: In function 'int foo()': xx.cc:19: no matching function for call to 'aaa<int>::bbb<char*>::bbb(const char[4])' xx.cc:5: candidates are ... message is correct, but I was expecting 'aaa<float>::...' instead of 'aaa<int>::...' since Y is bound to float See source code below Note 1: I am unable to say if this is related to the two stage lookup feature that you mention, as I don't know what it is and I don't have the C++ specs. Note 2: this code was isolated from a biger project, previously compiled using gcc 2.95 (didn't work either with 2.95 because I had a 'compiler error'). I expected 3.0 would allow me to rewrite it in a cleaner way. Sorry if it's already known, or a some misunderstanding from my own. Best regards, >How-To-Repeat: file xx.cc: template <class A> class aaa { public: template <class B> struct bbb { }; }; template <class X, class Y, class Z> class xxx { public: typedef aaa<Y>::bbb<Z> ccc; }; void foo (void) { xxx<int,float,char*>::ccc i ("aaa"); } >Fix: >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2001-12-26 1:16 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-12-25 17:16 antoine.de-maricourt [this message] 2002-06-07 7:40 lerdsuwa 2002-10-26 2:23 lerdsuwa
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=20011226011122.21428.qmail@sources.redhat.com \ --to=antoine.de-maricourt@m4x.org \ --cc=gcc-gnats@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).