Re: strange compiler behavior (gcc 4.0)
Re: strange compiler behavior (gcc 4.0)
- Subject: Re: strange compiler behavior (gcc 4.0)
- From: Peter Kelm <email@hidden>
- Date: Fri, 13 Oct 2006 18:09:22 +0200
Wouldn`t it make more sense to move Dealloc() from the derived into
the base class anyway (since this is the class the members belong
to)? What would be the benefit of having it in the derived class?
Peter
Am 13.10.2006 um 01:59 schrieb Daimen Duncan:
Using Xcode 2.4 and gcc 4.0:
I have a base class, like so:
template <class T> class Aryptr
{
…
protected:
value_type *elems;
int numElems;
…
}
Then I have a derived class, like so:
template <class TDec> class TAryA : public Aryptr <typename
TDesc::ValueType>
{
…
public:
void Dealloc() {elems = 0; numElems = maxElems = 0;}
…
}
This is pretty straight forward stuff, but the compiler complains
that the members (elems, numElems) are “not declared in this
scope”. If I prefix with Base:: it stops complaing, but I'm not
about to rewrite all my code for the specific compiler, it compiles
fine in VS (which is admittedly less strict).
Am I being stupid or is there a "don't be stupid" compiler setting?
Thanks,
~Duncan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden