[webkit-reviews] review granted: [Bug 186526] [Cocoa] Make some RetainPtr refinements to get more ready for ARC : [Attachment 342720] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jun 16 09:33:18 PDT 2018


Anders Carlsson <andersca at apple.com> has granted Darin Adler
<darin at apple.com>'s request for review:
Bug 186526: [Cocoa] Make some RetainPtr refinements to get more ready for ARC
https://bugs.webkit.org/show_bug.cgi?id=186526

Attachment 342720: Patch

https://bugs.webkit.org/attachment.cgi?id=342720&action=review




--- Comment #15 from Anders Carlsson <andersca at apple.com> ---
Comment on attachment 342720
  --> https://bugs.webkit.org/attachment.cgi?id=342720
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=342720&action=review

> Source/WTF/wtf/RetainPtr.h:150
> +#ifdef __OBJC__
> +    template<typename U> typename std::enable_if<std::is_convertible<U,
id>::value, PtrType>::type autoreleaseHelper();
> +    template<typename U> typename std::enable_if<!std::is_convertible<U,
id>::value, PtrType>::type autoreleaseHelper();
> +#endif

You can use std::enable_if_t here, and if WebKit requires C++17 you should be
able to use std::is_convertible_v as well.


More information about the webkit-reviews mailing list