| Summary: | Value assignment operator of Optional should be stricter | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Antti Koivisto <koivisto> | ||||
| Component: | Web Template Framework | Assignee: | 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: |
|
||||||
Created attachment 249914 [details]
patch
Comment on attachment 249914 [details]
patch
OK
Where's your test!?!?!?! 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. |
struct Foo { mutable Optional<std::chrono::seconds> s; }; Foo foo, foo2; foo = foo2; doesn't build because it tries to use wrong operator=.