[Webkit-unassigned] [Bug 187971] Move-constructing NeverDestroyed should move construct underlying object instead of copy constructing it

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 24 13:48:42 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=187971

--- Comment #2 from Daniel Bates <dbates at webkit.org> ---
I suspect the reason this does not effect Windows is because MS Visual Studio has a more aggressive optimizer that elides the call to the NeverDestroyed move constructor. Such aggressive eliding is allowed to be performed even if the move constructor has side effects in C++14, but not required. As of C++17 such an optimization is required by all compiler writers and is consistent with my observation that I do not get a compile-time error when compiling the code in comment #0 with clang using C++17.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180724/12b31688/attachment.html>


More information about the webkit-unassigned mailing list