public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/5023: Error declaring constructor of template class specialization as friend
@ 2002-07-23  8:02 lerdsuwa
  0 siblings, 0 replies; 2+ messages in thread
From: lerdsuwa @ 2002-07-23  8:02 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, jsberg, nobody

Synopsis: Error declaring constructor of template class specialization as friend

State-Changed-From-To: open->analyzed
State-Changed-By: lerdsuwa
State-Changed-When: Tue Jul 23 08:02:23 2002
State-Changed-Why:
    Confirmed.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5023


^ permalink raw reply	[flat|nested] 2+ messages in thread

* c++/5023: Error declaring constructor of template class specialization as friend
@ 2001-12-05 14:46 jsberg
  0 siblings, 0 replies; 2+ messages in thread
From: jsberg @ 2001-12-05 14:46 UTC (permalink / raw)
  To: gcc-gnats


>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:


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-07-23 15:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-23  8:02 c++/5023: Error declaring constructor of template class specialization as friend lerdsuwa
  -- strict thread matches above, loose matches on Subject: below --
2001-12-05 14:46 jsberg

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).