bug 534: non-const Ptr<T>::operator * () returns const reference

This commit is contained in:
Nicola Baldo
2009-04-16 13:28:51 +02:00
parent 1c60682201
commit 22545849a4

View File

@@ -106,7 +106,7 @@ public:
T *operator -> () const;
T *operator -> ();
const T &operator * () const;
const T &operator * ();
T &operator * ();
// allow if (!sp)
bool operator! ();
// allow if (sp)
@@ -472,7 +472,7 @@ Ptr<T>::operator * () const
}
template <typename T>
const T &
T &
Ptr<T>::operator * ()
{
return *m_ptr;