Bug 216225 - Make CompactUniquePtrTuple actually work with subclassing and custom deleter
Summary: Make CompactUniquePtrTuple actually work with subclassing and custom deleter
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords: InRadar
Depends on:
Blocks: 216264
  Show dependency treegraph
 
Reported: 2020-09-06 02:26 PDT by Ryosuke Niwa
Modified: 2020-09-08 00:22 PDT (History)
8 users (show)

See Also:


Attachments
Fixes the bugs (13.18 KB, patch)
2020-09-06 02:33 PDT, Ryosuke Niwa
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>