home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!stanford.edu!ames!pacbell.com!hoptoad!brendan
- From: brendan@cygnus.com (Brendan Kehoe)
- Newsgroups: comp.lang.c++
- Subject: Re: Invoking template base ctor
- Message-ID: <38397@hoptoad.uucp>
- Date: 9 Nov 92 21:43:34 GMT
- References: <VANDER.92Nov6115633@vancouver.stars.flab.Fujitsu.co.jp>
- Sender: news@hoptoad.uucp
- Reply-To: brendan@cygnus.com
- Organization: Cygnus Support, Palo Alto CA; Phone +1 415 322 3811
- Lines: 29
- Nntp-Posting-Host: cygnus.com
- In-reply-to: vander@flab.fujitsu.co.jp's message of 6 Nov 92 02:56:33 GMT
-
- In article <VANDER.92Nov6115633@vancouver.stars.flab.Fujitsu.co.jp> vander@flab.fujitsu.co.jp (Mike van der Velden) writes:
-
- I'm using g++ (2.2.2?) on a Sun Sparc S-4/1X. I have the following
- code segment.
-
- template <class T>
- class B {
- public:
- B () { /* */ }
- };
-
-
- class D : public B<D> {
- public:
- D() : () {} // compiles fine
- D() : B() {} // error: class `D' does not have any field named `B'
- };
-
-
- Please try the 2.3.1 release, it says:
-
- foo.C:11: `D::D ()' is already defined in class D
- foo.C: In method `D::D ()':
- foo.C:10: warning: ANSI C++ forbids old style base class initialization
-
- --
- Brendan Kehoe brendan@cygnus.com
- Cygnus Support, Palo Alto, CA +1 415 322 3811
-
-