[webkit-dev] Watch out for std::optional's move constructor
Fujii Hironori
fujii.hironori at gmail.com
Mon Dec 17 18:40:08 PST 2018
On Tue, Dec 18, 2018 at 11:16 AM Maciej Stachowiak <mjs at apple.com> wrote:
>
> Among other things, this allows for a “did anything actually get left
> here” check after the function that may or may not move a value. Seems like
> an upgrade.
>
>
Don't recommend such checks. It is simply use-after-move. The expression
WTFMove(x) means marking x as disposable.
On Tue, Dec 18, 2018 at 8:55 AM Alex Christensen <achristensen at apple.com>
wrote:
> I think we should do something to track and prevent the use of moved-from
> values instead of introducing our own std::optional replacement.
>
Do you have a idea?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20181218/63abd6ca/attachment.html>
More information about the webkit-dev
mailing list