Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* const_cast broken for CXX 5.5?
@ 1997-04-22  4:00 Phil Edwards
  0 siblings, 0 replies; only message in thread
From: Phil Edwards @ 1997-04-22  4:00 UTC (permalink / raw)



Hello.  I'm on a dUnix 3.2c system, using cxx 5.5-004.  When given
(essentially) the following code,

	template <class T>
	int
	Foo<T>::
	write (const T &output)
	{
	//trim...

	    T  *temp;

	    temp = const_cast<T*>(&output);

	//trim...
	}

the compiler fails with error, "Type not followed by "(" in an expression."
The "error indicator" appears as:

	temp = const_cast<T*>(&output);
	-------------------^

According to the Draft Standard, this is, I believe, correct syntax (some
of the other _cast statements given as examples in the Standard are even
more complicated).  Is there something more I need to do here, or is the
compiler just behind the times?

Thanks for your help.


/dev/phil



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-04-22  4:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-04-22  4:00 const_cast broken for CXX 5.5? Phil Edwards

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox