Bug 134119 - Add copy/move constructors and assignment operators to WTF::Optional
Summary: Add copy/move constructors and assignment operators to WTF::Optional
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-20 13:49 PDT by Anders Carlsson
Modified: 2014-06-20 13:55 PDT (History)
3 users (show)

See Also:


Attachments
Patch (3.02 KB, patch)
2014-06-20 13:50 PDT, Anders Carlsson
kling: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2014-06-20 13:49:56 PDT
Add copy/move constructors and assignment operators to WTF::Optional
Comment 1 Anders Carlsson 2014-06-20 13:50:22 PDT
Created attachment 233449 [details]
Patch
Comment 2 Andreas Kling 2014-06-20 13:54:26 PDT
Comment on attachment 233449 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=233449&action=review

r=me with a bug fix:

> Source/WTF/wtf/Optional.h:137
> +        new (NotNull, std::addressof(m_value)) T(std::forward<U>(u));
> +        return *this;

Missing "m_isEngaged = true;" here.
Comment 3 Anders Carlsson 2014-06-20 13:55:30 PDT
Committed r170202: <http://trac.webkit.org/changeset/170202>