core: return non-const reference when a const Ptr is dereferenced

Address issue #47
This commit is contained in:
Alexander Krotov
2019-04-12 00:51:25 +03:00
parent c167fbd771
commit 95de59adae

View File

@@ -175,7 +175,7 @@ public:
* A \c const dereference.
* \returns A pointer to the underlying object.
*/
const T &operator * () const;
T &operator * () const;
/**
* A dereference.
* \returns A pointer to the underlying object.
@@ -791,7 +791,7 @@ Ptr<T>::operator -> () const
}
template <typename T>
const T &
T &
Ptr<T>::operator * () const
{
return *m_ptr;