[Development] Thank you for qScopeGuard

Konstantin Ritt ritt.ks at gmail.com
Fri Mar 13 16:38:59 CET 2020


I just noticed the documentation says
> The callable shouldn't throw when executed, copied or moved.
, which brings a question: is there really a particular reason to copy
QScopeGuard instance? what the expected behavior for the instance copy
then, call f in some other place?

Regards,
Konstantin


пт, 21 февр. 2020 г. в 20:58, Thiago Macieira <thiago.macieira at intel.com>:

> On Friday, 21 February 2020 06:02:29 PST NIkolai Marchenko wrote:
> > it's definitely neat, but it's nothing that you can't do with pure c++
> > though. It's just qt's native implementation of score guard pattern. Tbh
> I
> > didn't even know it existed because I use my own scope guarder class.
>
> The reason we added it was because we needed and the Standard Library
> equivalent isn't (wasn't) available in all platforms Qt needed to be
> compiled
> on.
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel System Software Products
>
>
>
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> https://lists.qt-project.org/listinfo/development
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20200313/79cb29f6/attachment.html>


More information about the Development mailing list