public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "gcc-bugzilla at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/18276] New: template classes that are friends of template classes Date: Tue, 02 Nov 2004 17:04:00 -0000 [thread overview] Message-ID: <20041102170346.18276.akim@epita.fr> (raw) I am not positive about this bug report, but I cannot see what G++ wants from me, and in addition all the other compilers I have access to accept the following code (including 3.4). ---------------------------------------- template < template<typename> class Traits_ > struct Factory { }; template < template<typename> class Traits_> struct Product { template < template<typename> class > friend class Factory; }; template<typename Tag_> struct traits {}; int main () { Product<traits> (); } ---------------------------------------- % g++-3.4 -Wall temp2.cc % g++-snapshot -Wall temp2.cc temp2.cc: In instantiation of `Product<traits>': temp2.cc:19: instantiated from here temp2.cc:1: erreur: template parameter 'template<class> class Traits_' temp2.cc:8: erreur: redeclared here as 'template<template<class> class Traits_> template<class> class<template-parameter-1-1>' % icc -Wall temp2.cc % I do not understand the prototype g++ reports. It looks as if it concatenated the outer template to the inner friend template class. Environment: System: Linux nostromo 2.4.27-1-k7-smp #1 SMP Fri Sep 3 06:31:15 UTC 2004 i686 GNU/Linux Architecture: i686 host: i486-pc-linux-gnu build: i486-pc-linux-gnu target: i486-pc-linux-gnu configured with: ../src/configure -v --enable-languages=c,c++,java,objc,ada --prefix=/usr/lib/gcc-snapshot --enable-shared --with-system-zlib --enable-nls --enable-threads=posix --without-included-gettext --disable-werror --enable-__cxa_atexit --enable-libstdcxx-allocator=mt --enable-clocale=gnu --enable-libstdcxx-debug --enable-java-gc=boehm --enable-java-awt=gtk i486-linux-gnu How-To-Repeat: See above. ------- Additional Comments From akim at epita dot fr 2004-11-02 17:03 ------- Fix: No idea :) Unless my code is wrong, but I fail to see the clause in the standard. -- Summary: template classes that are friends of template classes Product: gcc Version: 0.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: akim at epita dot fr CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i486-pc-linux-gnu GCC host triplet: i486-pc-linux-gnu GCC target triplet: i486-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18276
next reply other threads:[~2004-11-02 17:04 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-11-02 17:04 gcc-bugzilla at gcc dot gnu dot org [this message] 2004-11-02 17:10 ` [Bug c++/18276] [4.0 Regression] " pinskia at gcc dot gnu dot org 2004-11-02 17:11 ` pinskia at gcc dot gnu dot org 2004-11-02 17:48 ` reichelt at gcc dot gnu dot org 2004-11-03 5:18 ` giovannibajo at libero dot it 2004-11-07 15:30 ` lerdsuwa at gcc dot gnu dot org 2004-11-09 16:01 ` lerdsuwa at gcc dot gnu dot org 2004-11-12 16:58 ` lerdsuwa at gcc dot gnu dot org 2004-12-02 12:04 ` lerdsuwa at gcc dot gnu 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=20041102170346.18276.akim@epita.fr \ --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).