This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Bug in egcs ?
- To: egcs at cygnus dot com
- Subject: Bug in egcs ?
- From: Laurent Deniau <Laurent dot Deniau at cern dot ch>
- Date: Thu, 23 Apr 1998 15:05:33 +0200
- Organization: CERN
Hello,
egcs doesn't complain on the following code:
template <typename T>
class Object {
public:
// ...
Object&
operator = (Object<T> const& e) {
const_cast<T>(_e) = e;
return *this;
}
private:
T _e;
};
According to the CD2, we should have write :
const_cast<T&>(_e) = e;
in order to get reference to _e.
with best regards,
[ Deniau Laurent -- Numerical Analysis and Signal Processing ]
[ CERN -- The European Laboratory for Particle Physics ]
[ Laurent.Deniau@cern.ch -- http://wwwinfo.cern.ch/~ldeniau ]