Bug 143303

Summary: Value assignment operator of Optional should be stricter
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: Web Template FrameworkAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, benjamin, cmarcelo, commit-queue, mmaxfield
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch kling: review+

Antti Koivisto
Reported 2015-04-01 05:21:56 PDT
struct Foo { mutable Optional<std::chrono::seconds> s; }; Foo foo, foo2; foo = foo2; doesn't build because it tries to use wrong operator=.
Attachments
patch (1.25 KB, patch)
2015-04-01 05:25 PDT, Antti Koivisto
kling: review+
Antti Koivisto
Comment 1 2015-04-01 05:25:13 PDT
Andreas Kling
Comment 2 2015-04-01 13:54:38 PDT
Comment on attachment 249914 [details] patch OK
Antti Koivisto
Comment 3 2015-04-01 14:02:53 PDT
Myles C. Maxfield
Comment 4 2015-04-01 15:41:32 PDT
Where's your test!?!?!?!
Antti Koivisto
Comment 5 2015-04-02 08:55:13 PDT
I don't think something like this requires a test. There are no functional changes. Code like http://trac.webkit.org/changeset/182271 just doesn't compile without this. Note that Optional is simply our version of std::optional which is likely to be in C++17.
Note You need to log in before you can comment on or make changes to this bug.