diff options
-rw-r--r-- | vmime/utility/smartPtr.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vmime/utility/smartPtr.hpp b/vmime/utility/smartPtr.hpp index 411983f3..1c1a1d20 100644 --- a/vmime/utility/smartPtr.hpp +++ b/vmime/utility/smartPtr.hpp @@ -475,6 +475,14 @@ public: return *this; } + ref <T> toStrong() + { + if (m_ptr == NULL) + return ref <T>(); + + return ref <T>::fromPtr(m_ptr); + } + // Implicit non-const => const conversion operator weak_ref <const T>() const { |