freepooma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pooma-dev] goofy Domain constructors


From: Scott Haney
Subject: Re: [pooma-dev] goofy Domain constructors
Date: Mon, 2 Apr 2001 11:07:02 -0600

On Monday, April 2, 2001, at 10:46 AM, Mark Mitchell wrote:

Julian> members from a templated base class. These members are
Julian> not visible under the C++ lookup rules, so you have to
Julian> qualify these with the "this" pointer (or with the base
Julian> class name for static members).

I don't understand this. The funny lookup rules only apply to types;
data members should work fine. For example, this is legal:

template <typename T>
struct A { int i; };

template <typename T>
struct B : public A<T> {
void f() { i = 3; }
};

However, your changes still aren't a bad idea; the standard says that
if there was a global `i', the code in B would use that *rather* than
the base class version.

I think these changes are a bad idea.

First, as Mark points out, data members should be visible. Moreover, we add the suffix _m to data members (e.g., foo_m) so there should never be a name collision with a global. I don't not want to see a bunch of this->that show up because of an HP compiler bug.

Scott

reply via email to

[Prev in Thread] Current Thread [Next in Thread]