[Development] Making QScopedPointer scoped (again)
Olivier Goffart
olivier at woboq.com
Wed Sep 4 08:06:00 CEST 2013
On Tuesday 03 September 2013 19:17:53 Olivier Goffart wrote:
[...]
> I would even go further and add conversions operators for STL compatibility:
>
> inline QScopePointer<T>::QScopePointer(std::unique_ptr<T> other)
> inline QScopePointer<T>::operator std::unique_ptr<T>()
I obviously meant:
inline QScopePointer<T>::QScopePointer(std::unique_ptr<T> &&other)
inline QScopePointer<T>::operator std::unique_ptr<T>() &&
It should only work with rvalue reference.
--
Olivier
Woboq - Qt services and support - http://woboq.com - http://code.woboq.org
More information about the Development
mailing list