[webkit-reviews] review granted: [Bug 214224] Make hasher work with tuple-like classes : [Attachment 404065] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jul 11 13:44:08 PDT 2020


Darin Adler <darin at apple.com> has granted Sam Weinig <sam at webkit.org>'s request
for review:
Bug 214224: Make hasher work with tuple-like classes
https://bugs.webkit.org/show_bug.cgi?id=214224

Attachment 404065: Patch

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




--- Comment #3 from Darin Adler <darin at apple.com> ---
Comment on attachment 404065
  --> https://bugs.webkit.org/attachment.cgi?id=404065
Patch

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

Thanks for finishing the job. You can tell from all the FIXME that I tried this
and couldn’t figure it out.

Where’s the part of this patch where you use this in Color?

> Source/WTF/ChangeLog:25
> +	   adhear to WebKit style as IsTypeComplete<>.

adhere

> Source/WTF/wtf/StdLibExtras.h:424
> +// Based on 'Detecting in C++ whether a type is defined, part 3: SFINAE and
incomplete types'
> +// <https://devblogs.microsoft.com/oldnewthing/20190710-00/?p=102678>
> +template<typename, typename = void> constexpr bool IsTypeComplete = false;
> +template<typename T> constexpr bool IsTypeComplete<T,
std::void_t<decltype(sizeof(T))>> = true;

Why rename IsTypeComplete? If we’re just previewing C++20, could we use the
real name and inject in the std namespace? Or maybe this is the way to go.


More information about the webkit-reviews mailing list