Bug 216225

Summary: Make CompactUniquePtrTuple actually work with subclassing and custom deleter
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: Web Template FrameworkAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, darin, ews-watchlist, saam, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 216264    
Attachments:
Description Flags
Fixes the bugs darin: review+

Description Ryosuke Niwa 2020-09-06 02:26:21 PDT
There are some bugs :(
Comment 1 Ryosuke Niwa 2020-09-06 02:33:31 PDT
Created attachment 408121 [details]
Fixes the bugs
Comment 2 Darin Adler 2020-09-06 14:09:36 PDT
Comment on attachment 408121 [details]
Fixes the bugs

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

> Source/WTF/wtf/CompactUniquePtrTuple.h:69
> +        CompactUniquePtrTuple<T, Type, Deleter> moved { WTFMove(other) };

Here inside a member we should not need to repeat the template arguments, so although it can’t use auto, it can be like this:

    CompactUniquePtrTuple moved { WTFMove(other) };

> Source/WTF/wtf/CompactUniquePtrTuple.h:118
> +    template <typename U, typename Y, typename D> friend class CompactUniquePtrTuple;

No need for the U/Y/D here. Can just be "typename, typename, typename".
Comment 3 Ryosuke Niwa 2020-09-07 20:46:29 PDT
Thanks for the reviews!

(In reply to Darin Adler from comment #2)
> Comment on attachment 408121 [details]
> Fixes the bugs
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=408121&action=review
> 
> > Source/WTF/wtf/CompactUniquePtrTuple.h:69
> > +        CompactUniquePtrTuple<T, Type, Deleter> moved { WTFMove(other) };
> 
> Here inside a member we should not need to repeat the template arguments, so
> although it can’t use auto, it can be like this:

Done.

>     CompactUniquePtrTuple moved { WTFMove(other) };
> 
> > Source/WTF/wtf/CompactUniquePtrTuple.h:118
> > +    template <typename U, typename Y, typename D> friend class CompactUniquePtrTuple;
> 
> No need for the U/Y/D here. Can just be "typename, typename, typename".

Removed.
Comment 4 Ryosuke Niwa 2020-09-07 20:50:16 PDT
Committed r266713: <https://trac.webkit.org/changeset/266713>
Comment 5 Radar WebKit Bug Importer 2020-09-07 20:51:17 PDT
<rdar://problem/68484458>