[webkit-dev] Should we ever use std::function instead of WTF::Function?
cdumez at apple.com
Tue Jun 13 09:26:25 PDT 2017
The only advantage of std::function that I know of is that it is copyable. Unless you really need to copy your lambda for a reason or another, I don’t see a good reason to ever use std::function instead of WTF::Function.
I have been slowly replacing std::function by WTF::Function in the code base but there are still a lot of uses of std::function.
> On Jun 13, 2017, at 9:24 AM, Darin Adler <darin at apple.com> wrote:
> I’ve noticed many patches switching us from std::function to WTF::Function recently, to fix problems with copying and thread safety.
> Does std::function have any advantages over WTF::Function? Should we ever prefer std::function, or should we use WTF::Function everywhere in WebKit where we would otherwise use std::function?
> — Darin
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev