Came across code in Node.h <https://trac.webkit.org/browser/trunk/Source/WebCore/dom/Node.h?rev=249287#L619> that uses CompactPointerTuple to store a bitmask and does raw bitmask manipulation. We have a type safe convenience class called OptionSet<> that represents a bitmask that can abstract such operations away plus it is pretty printable. We should support CompactPointerTuple<..., OptionSet<...>>.

I didn't specialize std::is_integral because of:
[[
None of the templates defined in <type_traits> may be specialized for a program-defined type, except for std::common_type. This includes the type traits and the class template std::integral_constant.
]]
<https://unixpapa.com/js/testkey.html>

Comment on attachment 378741[details]
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=378741&action=review>> Source/WTF/wtf/CompactPointerTuple.h:77
>> + };
>
> How about taking this as a template parameter of `CompactPointerTuple`? Like,
>
> template<typename PointerType, typename Type, typename Adaptor = ByteValueTypeAdapter<Type>>
> class CompactPointerTuple;
I can do this. Only reason not to is to avoid exposing ByteValueTypeAdapter in the WTF namespace....

Comment on attachment 378741[details]
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=378741&action=review>>> Source/WTF/wtf/CompactPointerTuple.h:77
>>> + };
>>
>> How about taking this as a template parameter of `CompactPointerTuple`? Like,
>>
>> template<typename PointerType, typename Type, typename Adaptor = ByteValueTypeAdapter<Type>>
>> class CompactPointerTuple;
>
> I can do this. Only reason not to is to avoid exposing ByteValueTypeAdapter in the WTF namespace....
Haha, I was trying to avoid exposing this struct, but accidentally put in public section. So, your suggestion is no different except for qualification.