[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hpux-devtools
Subject:    HPUX-DEVTOOLS: Type not defined error
From:       "DY, JERRY U (SBCSI)" <jd2419 () sbc ! com>
Date:       2003-09-04 21:16:58
[Download RAW message or body]

I have the following source:

template <typename T>
struct C {
        struct s {
                typedef int type;
        };
};


template <typename T>
class C2: public C< C2<T> > {
public:
        typename s::type jerry;

};

And I get the following errors:

Error 19: "test.C", line 12 # Unexpected 's'.
            typename s::type jerry;
                     ^
Error 419: "test.C", line 12 # 'type' is used as a type, but has not been
defined as a type.
            typename s::type jerry;
            ^^^^^^^^^^^^^^^^
Error 628: "test.C", line 12 # "<type inserted by compiler> C2::jerry"
["test.C", line 12] cannot be defined to have an
    incomplete type.
            typename s::type jerry;

C2 inherits from C so struct C should be visible within C2. Thanks!

-Jerry
 _________________________________________________________________
 To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
    with the message UNSUBSCRIBE hpux-devtools
 _________________________________________________________________
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic