public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: gccbugs@contacts.eelis.net To: gcc-gnats@gcc.gnu.org Subject: c++/9737: Partial template specialisation selection failure involving template parameter defaults Date: Mon, 17 Feb 2003 23:26:00 -0000 [thread overview] Message-ID: <20030217232041.16123.qmail@sources.redhat.com> (raw) >Number: 9737 >Category: c++ >Synopsis: Partial template specialisation selection failure involving template parameter defaults >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Mon Feb 17 23:26:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: gccbugs@contacts.eelis.net >Release: gcc version 3.2 (mingw special 20020817-1) >Organization: >Environment: Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable-languages=f77,c++,objc,ada --disable-win32-registry --disable-shared Thread model: win32 gcc version 3.2 (mingw special 20020817-1) >Description: G++ fails to perform correct partial template specialisation selection when the template parameter either depends on or is equal to a default type or value: // a simple template: template <typename> struct T {}; // two partial specializations: template <template <typename> class A, typename B> struct T<A<B> > {}; template <template <typename, typename> class A, typename B, typename C> struct T<A<B, C> > {}; // the subject type that we will try to match (note the default): template <typename, typename A = void> struct P; // now let's try to instantiate T with P: T<P<float, int > > a; // ok T<P<float, void> > b; // ambiguous instantiation T<P<float > > c; // ambiguous instantiation Comeau has no problems compiling any of this. >How-To-Repeat: Try compiling the code from the description. >Fix: No idea. >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2003-02-17 23:26 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-02-17 23:26 gccbugs [this message] 2003-02-18 0:13 bangerth 2003-02-21 15:28 lerdsuwa 2003-04-18 14:56 Kriang Lerdsuwanakij 2003-04-24 16:05 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=20030217232041.16123.qmail@sources.redhat.com \ --to=gccbugs@contacts.eelis.net \ --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).