jjg@gzilla.Sun.COM (Jonathan Gibbons) (01/24/90)
One for the language lawyers ...
I have a macro to emulate parameterized types: param_type(C,T).
It expands into a class declaration such that I can use it as follows
typedef param_type(List,String) Strings;
which might not be so different from
typedef List[String] Strings;
if ever we get parameterized types in C++.
The macro for the above example expands into something like
typedef class tmp { ... } Strings;
That is fine and works, but it is convenient at one point in one
header to be able to go
class Strings;
before the above macro expansion.
cfront is happy to have the two definitions co-exist, g++ isn't.
It seems the typedef in g++ doesn't do what I expected, which was
to declare Strings as the name of the class, as though it were
declared
typedef Strings { ... }
Am I being optimistic in expecting this to work at all, or is
g++ to be considered at fault?
-- Jon Gibbons
jjg@sun.com