Changeset 231353 in webkit
- Timestamp:
- May 4, 2018 8:35:29 AM (6 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r231342 r231353 1 2018-05-04 Antti Koivisto <antti@apple.com> 2 3 OptionsSet initializer list constructor should be constexpr 4 https://bugs.webkit.org/show_bug.cgi?id=185298 5 6 Reviewed by Anders Carlsson. 7 8 * wtf/OptionSet.h: 9 (WTF::OptionSet::OptionSet): 10 1 11 2018-05-03 Yusuke Suzuki <utatane.tea@gmail.com> 2 12 -
trunk/Source/WTF/wtf/OptionSet.h
r225142 r231353 79 79 { 80 80 } 81 82 constexpr OptionSet(std::initializer_list<T> initializerList) 83 { 84 for (auto& option : initializerList) 85 m_storage |= static_cast<StorageType>(option); 86 } 81 87 #else 82 88 OptionSet(T t) … … 85 91 ASSERT_WITH_MESSAGE(hasOneBitSet(static_cast<StorageType>(t)), "Enumerator is not a positive power of two."); 86 92 } 87 #endif88 93 89 // FIXME: Make this constexpr once we adopt C++14 as C++11 does not support for-loops90 // in a constexpr function.91 94 OptionSet(std::initializer_list<T> initializerList) 92 95 { … … 96 99 } 97 100 } 101 #endif 98 102 99 103 constexpr StorageType toRaw() const { return m_storage; }
Note: See TracChangeset
for help on using the changeset viewer.