On quarta-feira, 19 de abril de 2017 10:48:38 PDT Konstantin Tokarev wrote:
> >         auto ptr = QSharedPointer<QObject *>(new QObject,
> >         &QObject::deleteLater);
> > 
> > So I think this actually belongs in the std-proposals mailing list, not in
> > Qt.
> > 
> > Until C++20 gets it, you can use a lambda.
> 
> It's not possible to have members with auto-deduced types in non-template
> class, so I actually cannot.

Then don't use auto-deduced types.

auto ptr = std::shared_ptr<QObject *>(new QObject, 
                [](QObject *o) { o->deleteLater(); });

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to