public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "debian-gcc at lists dot debian dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/18007] New: Template template specialization matching problem Date: Fri, 15 Oct 2004 06:30:00 -0000 [thread overview] Message-ID: <20041015063000.18007.debian-gcc@lists.debian.org> (raw) [forwarded from http://bugs.debian.org/269513] Gcc 3.3 and gcc 3.4 both give the error message "error: `type' is not a member of `outer<dummy>::inner<dummy<int> >'" when trying to compile the following: template<typename dummy_var> struct dummy { }; template<template<typename> class outer_func> struct outer { template<typename inner_var> struct inner { }; template<typename dummy_var> struct inner<outer_func<dummy_var> > { typedef dummy_var type; }; }; int main(){ outer<dummy>::inner<dummy<int> >::type var = 0; return var; } Both cxx (Digital's compiler) and icc (Intel's compiler) have no such problem. It appears that gcc does not properly match against the specialized inner struct in this case (i.e. it fails to match when the specialized parameter is based on a template template parameter of an enclosing struct). -T PS: Note that the following version (which contains an even more explicit specialization) also does not work with gcc (and also does work with both cxx and icc): template<template<typename> class outer_func> struct outer { template<typename inner_var, typename dummy=void> struct inner { }; template<typename dummy> struct inner<outer_func<int>,dummy> { typedef int type; }; }; -- Summary: Template template specialization matching problem Product: gcc Version: 3.4.3 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: debian-gcc at lists dot debian dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18007
next reply other threads:[~2004-10-15 6:30 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-10-15 6:30 debian-gcc at lists dot debian dot org [this message] 2004-10-15 6:30 ` [Bug c++/18007] " debian-gcc at lists dot debian dot org 2004-10-15 12:59 ` pinskia at gcc dot gnu dot org 2004-10-15 14:50 ` bangerth at dealii dot 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=20041015063000.18007.debian-gcc@lists.debian.org \ --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).