July 16, 2004
Because of prior problems with failure to access member types (which are interpreted as properties), I've found a way to hack around it by declaring a static member of the given type, and then using typeof on that member. However, when trying to use it in base classes, as shown below, it's not acceptable to the compiler.


template FilteredNotionalRange(R, F) { class FilteredNotionalRange
// : public R.range_type
    : public typeof(R.range_type_hack)
{
    . . .



July 17, 2004
"Matthew Wilson" <admin.hat@stlsoft.dot.org> wrote in message news:cd7jr4$2nnf$1@digitaldaemon.com...
> Because of prior problems with failure to access member types (which are interpreted as properties), I've found a way to hack around it by
declaring
> a static member of the given type, and then using typeof on that member. However, when trying to use it in base classes, as shown below, it's not acceptable to the compiler.
>
>
> template FilteredNotionalRange(R, F) { class FilteredNotionalRange
> // : public R.range_type
>     : public typeof(R.range_type_hack)
> {

Your example is incomplete, so I dummied up one:

-------------------------------------------
class A
{
    typedef A atype;
    int a;
}

class B : A.atype
{
    int b;
}

void main()
{
    B b = new B();

    b.a = 3;
}
----------------------------------------

and it compiles successfully.