[Prev][Next][Index]

'class' gets lost in unparsing




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