[Interest] QScopedPointer and c++11 move semantics
Alexander Dyagilev
alervdvcw at gmail.com
Fri Dec 30 21:03:51 CET 2016
This does not work either:
std::unique_ptr<SomeQObject, decltype(&QObject::deleteLater)> var(
pointer, &QObject::deleteLater);
On 12/30/2016 10:58 PM, Alexander Dyagilev wrote:
>
> On 12/30/2016 10:55 PM, Konstantin Tokarev wrote:
>>
>> 30.12.2016, 22:45, "Alexander Dyagilev" <alervdvcw at gmail.com>:
>>> QScopedPointer var(new QObject, &QObject::deleteLater) - compiles fine.
>>>
>>> std::unique_ptr var(new QObject, &QObject::deleteLater) - does not
>>> compile.
>>>
>>> Is there an easy way I miss?
>> std::mem_fun(&QObject::deleteLater) should work
>
> It does not work, unfortunately (not compiles).
>
More information about the Interest
mailing list