15.06.2016, 18:02, "Thiago Macieira" <thiago.macie...@intel.com>: > On quarta-feira, 15 de junho de 2016 15:44:09 PDT Giuseppe D'Angelo wrote: >> Il 14/06/2016 19:01, Sune Vuorela ha scritto: >> > You can pass your own classes as handlers, provided that they have a >> > public static function void cleanup(T *pointer). >> > >> > - from the documentation. >> >> However, you can't pass a per-QScopedPointer unique deleter object, >> which also makes this part of the API sub-par compared with the Standard... > > Or, if you look at the same problem from a different angle, since > QScopedPointer has the same size as a regular pointer, allowing you to replace > a regular pointer in a class with it, without causing a binary compatibility > break, its API is better than the Standard.
std::unique_ptr<T> always has the same size as pointer. std::unique_ptr<T, Deleter> is different type (thought it also has the same size as pointer if Deleter is stateless) -- Regards, Konstantin _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development