[pooma-dev] goofy Domain constructors
Mark Mitchell
mark at codesourcery.com
Mon Apr 2 16:46:51 UTC 2001
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 mark at codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
More information about the pooma-dev
mailing list