Changeset 182254 in webkit
- Timestamp:
- Apr 1, 2015, 2:01:24 PM (10 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r182243 r182254 1 015-04-01 Antti Koivisto <antti@apple.com> 2 3 Value assignment operator of Optional should be stricter 4 https://bugs.webkit.org/show_bug.cgi?id=143303 5 6 Reviewed by Andreas Kling. 7 8 struct Foo { mutable Optional<std::chrono::seconds> s; }; 9 Foo foo, foo2; 10 foo = foo2; 11 12 doesn't build because it tries to use wrong operator=. 13 14 * wtf/Optional.h: 15 16 Add enable_if test similar to std::experimental::optional. 17 1 18 2015-04-01 Alex Christensen <achristensen@webkit.org> 2 19 -
trunk/Source/WTF/wtf/Optional.h
r181398 r182254 123 123 } 124 124 125 template<typename U >125 template<typename U, class = typename std::enable_if<std::is_same<typename std::remove_reference<U>::type, T>::value>::type> 126 126 Optional& operator=(U&& u) 127 127 {
Note:
See TracChangeset
for help on using the changeset viewer.