Changeset 262092 in webkit
- Timestamp:
- May 22, 2020 8:31:22 PM (4 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r262087 r262092 1 2020-05-22 David Kilzer <ddkilzer@apple.com> 2 3 WTF::isValidEnum() has a typo in static_assert making it a tautological comparison 4 <https://webkit.org/b/212290> 5 6 Reviewed by Yusuke Suzuki. 7 8 * wtf/EnumTraits.h: 9 (WTF::isValidEnum): Use sizeof(std::underlying_type_t<E>) 10 instead of std::underlying_type_t<E>() to fix the bug. 11 1 12 2020-05-22 Chris Dumez <cdumez@apple.com> 2 13 -
trunk/Source/WTF/wtf/EnumTraits.h
r261254 r262092 57 57 constexpr bool isValidEnum(T t) 58 58 { 59 static_assert(sizeof(T) >= s td::underlying_type_t<E>(), "Integral type must be at least the size of the underlying enum type");59 static_assert(sizeof(T) >= sizeof(std::underlying_type_t<E>), "Integral type must be at least the size of the underlying enum type"); 60 60 61 61 return EnumValueChecker<T, typename EnumTraits<E>::values>::isValidEnum(t);
Note: See TracChangeset
for help on using the changeset viewer.