[pooma-dev] goofy Domain constructors
Scott Haney
scotth at proximation.com
Mon Apr 2 17:07:02 UTC 2001
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1100 bytes
Desc: not available
URL: <http://sourcerytools.com/pipermail/pooma-dev/attachments/20010402/ae690da9/attachment.bin>
More information about the pooma-dev
mailing list