Built in limitations (VC6)

For VisualC++ 6.0 the nested template classes have an additional type parameter because allthough this compiler allows full specialization of class templates at class scope this does not compile with VC6:
class Base
{
    template<int i> struct S{};
    template<> struct S<0>{};
};

class Derived:Base
{
    template<int i> struct S{};
    template<> struct S<0>{};
};
                    
this does compile with vc6:
class Base
{
    template<int i, class> struct S{};
    template<> struct S<0,Base>{};
};

class Derived:Base
{
    template<int i, class> struct S{};
    template<> struct S<0,Derived>{};
};
                    

hence in order to support inheriting reflected classes from eachother all corresponding member template classes get an additional parameter:

template<class Tag, class> struct GetValueTypeByTag

and the full specializations defined through the macros to reflect members specialize these compile time functions with the enclosing class as second parameter.

Last revised: September 13, 2004 Copyright 2004 Arne Adams