[Interest] QScopedPointer and c++11 move semantics
Thiago Macieira
thiago.macieira at intel.com
Sat Dec 31 12:49:18 CET 2016
Em sexta-feira, 30 de dezembro de 2016, às 22:41:14 BRST, Kitsune Ral via
Interest escreveu:
> The most concise, I guess, is:
> static const auto laterDeleter = std::mem_fn(&QObject::deleteLater);
> std::unique_ptr<QObject, decltype(laterDeleter)> a(nullptr, laterDeleter);
>
> In C++17, if I don't mistake, you won't ned explicit type specifier in the
> template, so it shortens to: std::unique_ptr<QObject> a(nullptr,
> std::mem_fn(&QObject::deleteLater));
I don't think that's plain C++17, that's actually the Concepts TS.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Interest
mailing list