[webkit-dev] Watch out for std::optional's move constructor

Fujii Hironori fujii.hironori at gmail.com
Sun Dec 16 19:43:15 PST 2018

I don't like the proposal because it encourages misuse of move.
We can use move only for values about to be destroyed.

I like Dan's suggestion. We should use std::exchange or std::optional::swap
for the cases.
Or, what about adding a new method WTF::Optional::release() for the case?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20181217/79e5a8d2/attachment.html>

More information about the webkit-dev mailing list