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