[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pooma-dev] goofy Domain constructors
From: |
Mark Mitchell |
Subject: |
Re: [pooma-dev] goofy Domain constructors |
Date: |
Mon, 02 Apr 2001 09:46:51 -0700 |
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.
A meta-point here as well: it's good to make the code cleaner, but
working with HP's compiler is not *in and of itself* a project goal.
If we get better code that way, or if you get other work done, that's
good; otherwise, it's probably not worth it.
It's horrible to be pretending to be management; you have to actually
say things like that.
--
Mark Mitchell address@hidden
CodeSourcery, LLC http://www.codesourcery.com
- Re: [pooma-dev] goofy Domain constructors,
Mark Mitchell <=