Re: [Development] Can we use std::unique_ptr in Qt base/modules sources since Qt5.7 ?

2016-06-15 Thread Konstantin Tokarev
15.06.2016, 18:02, "Thiago Macieira" : > 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

Re: [Development] Can we use std::unique_ptr in Qt base/modules sources since Qt5.7 ?

2016-06-15 Thread Thiago Macieira
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. > >

Re: [Development] Can we use std::unique_ptr in Qt base/modules sources since Qt5.7 ?

2016-06-14 Thread Sune Vuorela
On 2016-06-14, Konstantin Tokarev wrote: > QScopedPointer lacks custom deleters which make it unusable for the purpose > of managing Windows HANDLEs (see original post). You can pass your own classes as handlers, provided that they have a public static function void cleanup(T

Re: [Development] Can we use std::unique_ptr in Qt base/modules sources since Qt5.7 ?

2016-06-14 Thread Konstantin Tokarev
14.06.2016, 18:03, "Bo Thorsen" : > Den 13-06-2016 kl. 12:16 skrev Denis Shienkov: >>>  QScopedPointer? >> >>  Do you have real example? ;) > > Well, as Sean wrote it lacks the move, but if all you're after is to use > it for a pointer in a class or make a local dynamically

Re: [Development] Can we use std::unique_ptr in Qt base/modules sources since Qt5.7 ?

2016-06-14 Thread Bo Thorsen
Den 13-06-2016 kl. 12:16 skrev Denis Shienkov: QScopedPointer? Do you have real example? ;) Well, as Sean wrote it lacks the move, but if all you're after is to use it for a pointer in a class or make a local dynamically allocated var exception safe, then QScopedPointer is fine. It's

Re: [Development] Can we use std::unique_ptr in Qt base/modules sources since Qt5.7 ?

2016-06-13 Thread Denis Shienkov
> QScopedPointer? Do you have real example? ;) 2016-06-13 7:47 GMT+03:00 Bo Thorsen : > Den 12-06-2016 kl. 12:59 skrev Denis Shienkov: > >> No, use of the C++11 Standard Library features is not permitted >>> >> >> Lousy to hear it... >> >> How to do then RAII to avoid a

Re: [Development] Can we use std::unique_ptr in Qt base/modules sources since Qt5.7 ?

2016-06-13 Thread Иван Комиссаров
If we don't have unique_ptr, then, probably, we don't have move semantics too 2016-06-13 10:51 GMT+03:00 Sean Harmer : > On Monday 13 June 2016 06:47:44 Bo Thorsen wrote: > > Den 12-06-2016 kl. 12:59 skrev Denis Shienkov: > > >> No, use of the C++11 Standard Library

Re: [Development] Can we use std::unique_ptr in Qt base/modules sources since Qt5.7 ?

2016-06-13 Thread Sean Harmer
On Monday 13 June 2016 06:47:44 Bo Thorsen wrote: > Den 12-06-2016 kl. 12:59 skrev Denis Shienkov: > >> No, use of the C++11 Standard Library features is not permitted > > > > Lousy to hear it... > > > > How to do then RAII to avoid a leaks e.g. for Windows handles (HANDLE, > > HKEY, HDEVINFO

Re: [Development] Can we use std::unique_ptr in Qt base/modules sources since Qt5.7 ?

2016-06-12 Thread Bo Thorsen
Den 12-06-2016 kl. 12:59 skrev Denis Shienkov: No, use of the C++11 Standard Library features is not permitted Lousy to hear it... How to do then RAII to avoid a leaks e.g. for Windows handles (HANDLE, HKEY, HDEVINFO and other stuff)? QScopedPointer? Bo Thorsen, Director, Viking Software.

Re: [Development] Can we use std::unique_ptr in Qt base/modules sources since Qt5.7 ?

2016-06-12 Thread Thiago Macieira
On domingo, 12 de junho de 2016 13:59:32 PDT Denis Shienkov wrote: > > No, use of the C++11 Standard Library features is not permitted > > Lousy to hear it... > > How to do then RAII to avoid a leaks e.g. for Windows handles (HANDLE, > HKEY, HDEVINFO and other stuff)? You can use it if you

Re: [Development] Can we use std::unique_ptr in Qt base/modules sources since Qt5.7 ?

2016-06-12 Thread Denis Shienkov
> No, use of the C++11 Standard Library features is not permitted Lousy to hear it... How to do then RAII to avoid a leaks e.g. for Windows handles (HANDLE, HKEY, HDEVINFO and other stuff)? BTW: But, I saw unique_ptr in qtbase and qt3d sources... 12.06.2016 1:10, Thiago Macieira пишет: On

Re: [Development] Can we use std::unique_ptr in Qt base/modules sources since Qt5.7 ?

2016-06-11 Thread Thiago Macieira
On sábado, 11 de junho de 2016 17:25:40 PDT Denis Shienkov wrote: > Hi all... > > Is it possible now? No, use of the C++11 Standard Library features is not permitted, outside of inline code with #ifdef. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open

[Development] Can we use std::unique_ptr in Qt base/modules sources since Qt5.7 ?

2016-06-11 Thread Denis Shienkov
Hi all... Is it possible now? BR, Denis ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development