Changeset 205577 in webkit
- Timestamp:
- Sep 7, 2016 5:40:17 PM (8 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r205569 r205577 1 2016-09-07 JF Bastien <jfbastien@apple.com> 2 3 bitwise_cast: allow const destination type 4 https://bugs.webkit.org/show_bug.cgi?id=161719 5 6 Reviewed by Saam Barati. 7 8 * wtf/StdLibExtras.h: 9 (WTF::bitwise_cast): allow `const To to = bitwise_cast<const To>(from);` 10 1 11 2016-09-07 Mark Lam <mark.lam@apple.com> 2 12 -
trunk/Source/WTF/wtf/StdLibExtras.h
r205362 r205577 152 152 static_assert(__is_trivially_copyable(FromType), "bitwise_cast of non-trivially-copyable type!"); 153 153 #endif 154 ToType to{ };154 typename std::remove_const<ToType>::type to { }; 155 155 std::memcpy(&to, &from, sizeof(to)); 156 156 return to;
Note: See TracChangeset
for help on using the changeset viewer.