Changeset 164190 in webkit
- Timestamp:
- Feb 16, 2014, 1:11:44 AM (12 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r164185 r164190 1 2014-02-16 Zan Dobersek <zdobersek@igalia.com> 2 3 Reintroduce const qualifiers for return types of (Filter|Transform)Iterator::operator*() 4 https://bugs.webkit.org/show_bug.cgi?id=126875 5 6 The const qualifiers for the return types of FilterIterator::operator*() and TransformIterator::operator*() 7 were removed in r161797 and r161802 because of compilation failures when using GCC and having an Iterator 8 type that already had the const qualifier. std::remove_const is now used to appease GCC and enforce the const 9 qualifier on the return type, regardless of the Iterator type and its qualifiers. 10 11 * wtf/IteratorAdaptors.h: 12 (WTF::FilterIterator::operator*): 13 (WTF::TransformIterator::operator*): 14 1 15 2014-02-15 Filip Pizlo <fpizlo@apple.com> 2 16 -
trunk/Source/WTF/wtf/IteratorAdaptors.h
r161802 r164190 27 27 #define WTF_IteratorAdaptors_h 28 28 29 #include <type_traits> 30 29 31 namespace WTF { 30 32 … … 51 53 } 52 54 53 decltype(*std::declval<Iterator>())operator*() const55 const typename std::remove_const<decltype(*std::declval<Iterator>())>::type operator*() const 54 56 { 55 57 ASSERT(m_iter != m_end); … … 88 90 } 89 91 90 decltype(std::declval<Transform>()(*std::declval<Iterator>()))operator*() const92 const typename std::remove_const<decltype(std::declval<Transform>()(*std::declval<Iterator>()))>::type operator*() const 91 93 { 92 94 return m_transform(*m_iter);
Note:
See TracChangeset
for help on using the changeset viewer.