🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #953

template, constructor call

#953
From: Jonas Nygren
Date: Mon, 17 Aug 1992 08:14
22 lines
696 bytes
Having a class X

class X { public: class X(X&) {} };

and a template

template<class T> class Y {
	T *p;
public:
	void set(T &r) { p->T::T(r); }
};

the following wont work

Y<X> yx;
X x;

yx.set(x);

gcc will complain 'no function T in X'.

/jonas
Technical Details
Message-ID: <1992Aug17.081440.24643@ericsson.se>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!beppe.ericsson.SE!jonas

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!beppe.ericsson.SE!jonas
From: jonas@beppe.ericsson.SE (Jonas Nygren)
Subject: template, constructor call
Message-ID: <1992Aug17.081440.24643@ericsson.se>
Sender: gnulists@ai.mit.edu
Reply-To: jonas@beppe.ericsson.se
Organization: Ericsson Telecom AB
Distribution: gnu
Date: Mon, 17 Aug 1992 08:14:40 GMT
Approved: bug-gcc@prep.ai.mit.edu
Lines: 25