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

JF Bastien jfb at chromium.org
Fri Sep 1 13:50:12 PDT 2017


The standard wants you to specialize things in std sometimes, and not other
times... I’m not sure here’s clear guidance here. :(

On Fri, Sep 1, 2017 at 10:46 AM Maciej Stachowiak <mjs at apple.com> wrote:

>
>
> > 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.
>
> It might be possible to make a specialization of std::optional<Ref> that
> avoids the overhead for a separate initialized bool. I'm not sure if it is
> wise to write specializations of standard library template classes though.
>
> Regards,
> Maciej
>
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20170901/160c7ec0/attachment.html>


More information about the webkit-dev mailing list