Re: C++: Problem with overloading a constructor when splitting a

2001-11-18 Thread Dan Kenigsberg
On Sun, 18 Nov 2001, Shaul Karl wrote: you have put an inline function inside a '.cc' file. since it is inline, it will NOT be included in the object file 'base.cc', and thus, during link, there base constructor will be undefined. this is your bug - not g++'s. fixes:

Re: C++: Problem with overloading a constructor when splitting a

2001-11-18 Thread mulix
On Sun, 18 Nov 2001, Dan Kenigsberg wrote: This may seem an ugly feature of C++, but in fact it is better than the C counterpart - macros. In fact, writing the implementation of inline functions in header file is a beautiful gem, comparing to writing the implemetation of calss templates in

Re: C++: Problem with overloading a constructor when splitting a

2001-11-18 Thread Oleg Goldshmidt
Dan Kenigsberg [EMAIL PROTECTED] writes: This may seem an ugly feature of C++, but in fact it is better than the C counterpart - macros. Inlined functions are supposed to be a standard C feature in C99. GCC has had them for years. In fact, writing the implementation of inline functions in

Re: C++: Problem with overloading a constructor when splitting a

2001-11-18 Thread Daniel Feiglin
See discussion on export keyword, p. 205 in The C++ Programming Language (3rd edn.), Stroustrup. It should do the job, but I don't know in GNU c++ implements it. mulix wrote: On Sun, 18 Nov 2001, Dan Kenigsberg wrote: This may seem an ugly feature of C++, but in fact it is better than the

Re: C++: Problem with overloading a constructor when splitting a

2001-11-18 Thread Oleg Goldshmidt
Daniel Feiglin [EMAIL PROTECTED] writes: See discussion on export keyword, p. 205 in The C++ Programming Language (3rd edn.), Stroustrup. It should do the job, but I don't know in GNU c++ implements it. No. You get warning: keyword 'export' not implemented and will be ignored with gcc

C++: Problem with overloading a constructor when splitting a src file.

2001-11-17 Thread Shaul Karl
Part 1: this works as expected -- [01:27:40 tmp]$ cat main.cc #include iostream #include string using namespace std; class base { public: base(); base(string str); }; class derived : public base { public: derived(string str)

Re: C++: Problem with overloading a constructor when splitting a src file.

2001-11-17 Thread guy keren
the function not 'inline'. guy On Sun, 18 Nov 2001, Shaul Karl wrote: Date: Sun, 18 Nov 2001 01:38:10 +0200 From: Shaul Karl [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: C++: Problem with overloading a constructor when splitting a src file. Part 1: this works as expected

Re: C++: Problem with overloading a constructor when splitting a src file.

2001-11-17 Thread Shaul Karl
PROTECTED] To: [EMAIL PROTECTED] Subject: C++: Problem with overloading a constructor when splitting a src file. Part 1: this works as expected -- [01:27:40 tmp]$ cat main.cc #include iostream #include string using namespace std; class

Re: C++: Problem with overloading a constructor when splitting asrc file.

2001-11-17 Thread guy keren
On Sun, 18 Nov 2001, Shaul Karl wrote: you have put an inline function inside a '.cc' file. since it is inline, it will NOT be included in the object file 'base.cc', and thus, during link, there base constructor will be undefined. this is your bug - not g++'s. fixes: 1. move the