[webkit-reviews] review granted: [Bug 214654] WTF::Function adoption should be explicit instead of implicit : [Attachment 404971] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jul 22 15:33:22 PDT 2020
Darin Adler <darin at apple.com> has granted Geoffrey Garen <ggaren at apple.com>'s
request for review:
Bug 214654: WTF::Function adoption should be explicit instead of implicit
https://bugs.webkit.org/show_bug.cgi?id=214654
Attachment 404971: Patch
https://bugs.webkit.org/attachment.cgi?id=404971&action=review
--- Comment #8 from Darin Adler <darin at apple.com> ---
Comment on attachment 404971
--> https://bugs.webkit.org/attachment.cgi?id=404971
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=404971&action=review
> Source/WTF/wtf/Function.h:125
> +template <typename T> inline Function<T> adopt(typename Function<T>::Impl*
impl)
I think you want to write something more like this:
template<typename Out, typename... In> Function<Out(In...)>
adopt(Detail::CallableWrapperBase<Out, In...>* pointer)
That should allow you to use adopt() without template arguments.
More information about the webkit-reviews
mailing list