From: pedwards@cs.wright.edu (Phil Edwards)
Subject: const_cast broken for CXX 5.5?
Date: 1997/04/22 [thread overview]
Message-ID: <5jhm6n$jju$1@alpha.wright.edu> (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
reply other threads:[~1997-04-22 4:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox