public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: jsberg@bnl.gov To: gcc-gnats@gcc.gnu.org Subject: c++/5023: Error declaring constructor of template class specialization as friend Date: Wed, 05 Dec 2001 14:46:00 -0000 [thread overview] Message-ID: <200112052236.fB5MawBt010641@jsberg1.cap.bnl.gov> (raw) >Number: 5023 >Category: c++ >Synopsis: Error declaring constructor of template class specialization as friend >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Wed Dec 05 14:46:08 PST 2001 >Closed-Date: >Last-Modified: >Originator: >Release: 3.0.2 >Organization: >Environment: System: Linux jsberg1 2.4.9 #2 SMP Tue Aug 21 17:36:52 EDT 2001 i686 unknown Architecture: i686 host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: i686-pc-linux-gnu configured with: ../gcc-3.0.2/configure --prefix=/opt/gcc-3.0.2 >Description: This code: template<class C> class S { public: S(); private: }; class T { friend S<int>::S<int>(); public: T(); private: void f() const; }; template<class C> S<C>::S() { // T t; t.f(); } S<int> s; Compiled with this command line: c++ -c test02.cxx Gives this error test02.cxx:8: no `void S<int>::S()' member function declared in class `S<int>' >How-To-Repeat: >Fix: Plenty of workarounds: friend class S<int>; or template<class C> friend S<C>::S(); >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2001-12-05 22:46 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-12-05 14:46 jsberg [this message] 2002-07-23 8:02 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=200112052236.fB5MawBt010641@jsberg1.cap.bnl.gov \ --to=jsberg@bnl.gov \ --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).