[webkit-dev] Get rid of RefPtr, replace with std::optional<Ref>?

Filip Pizlo fpizlo at apple.com
Fri Sep 1 10:23:57 PDT 2017



> On Sep 1, 2017, at 10:07 AM, Brady Eidson <beidson at apple.com> wrote:
> 
> 
> 
>> On Sep 1, 2017, at 9:46 AM, Maciej Stachowiak <mjs at apple.com> wrote:
>>> 
>>> Does RefPtr do anything for us today that std::optional<Ref> doesn’t?
>> 
>> The obvious things would be: uses less storage space
> 
> Grumble. If that’s true (which, thinking about it, of course it is true) this is pretty much a nonstarter. So… nevermind.

Even though I disagree with your proposal, I don’t think this is a good reason since we could create a template specialization for std::optional<Ref>.

I think we could probably do that anyway since this type can arise through template instantiations (one place says std::optional<T> and something else sets T to Ref): https://bugs.webkit.org/show_bug.cgi?id=176228 <https://bugs.webkit.org/show_bug.cgi?id=176228>

-Filip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20170901/e6db0176/attachment.html>


More information about the webkit-dev mailing list