S
Steffen Hampel
class Cfoo {
class Innerfoo;
typedef Innerfoo::Type1 Type1; // error: use of undefined type
Cfoo::Innerfoo::Type1 bar; // error: use of undefined type
};
class Cfoo::Innerfoo {
typedef int Type1;
};
My understanding of the standard was that you can use undefined types in
declarations. The GCC agrees (no errors) but the VC++ compiler doesn't
(error messages as above). Who is right? I want to write compiler
independ code dammit.
class Innerfoo;
typedef Innerfoo::Type1 Type1; // error: use of undefined type
Cfoo::Innerfoo::Type1 bar; // error: use of undefined type
};
class Cfoo::Innerfoo {
typedef int Type1;
};
My understanding of the standard was that you can use undefined types in
declarations. The GCC agrees (no errors) but the VC++ compiler doesn't
(error messages as above). Who is right? I want to write compiler
independ code dammit.