[Prev][Next][Index]
'class' gets lost in unparsing
- To: sage-bugs@extreme.indiana.edu
- Subject: 'class' gets lost in unparsing
- Date: Wed, 26 Apr 1995 09:41:44 -0700
- From: Lars Thomas Hansen <lth@cs.uoregon.edu>
- Sender: owner-sage-bugs@extreme.indiana.edu
Consider the following global definition:
void foo( class iluServer *server );
This unparses to identical code and everything is groovy. Consider then
the following class definition:
class x {
public:
static void foo( class iluServer *server );
};
This unparses to the incorrect
class x {
public:
public:
static void foo(iluServer *server);
};
Notice that the 'class' keyword has been lost. pc++ is happy, but
the C++ compiler is not. Forward declaring iluServer before the
definition of class x solves the problem.
--lars