Changeset 12328 in webkit for trunk/JavaScriptCore/kxmlcore/HashMap.h
- Timestamp:
- Jan 23, 2006, 10:24:11 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kxmlcore/HashMap.h
r12321 r12328 30 30 namespace KXMLCore { 31 31 32 template<typename PairType> 33 inline typename PairType::first_type const& extractFirst(const PairType& value) 34 { 35 return value.first; 36 } 32 template<typename Key, typename Mapped> 33 class PairFirstExtractor 34 { 35 typedef pair<Key, Mapped> ValueType; 36 37 public: 38 static const Key& extract(const ValueType& value) 39 { 40 return value.first; 41 } 42 }; 37 43 38 44 template<typename Key, typename Mapped, typename HashFunctions> … … 68 74 typedef PairHashTraits<KeyTraits, MappedTraits> ValueTraits; 69 75 private: 70 typedef HashTable<KeyType, ValueType, extractFirst<ValueType>, HashFunctions, ValueTraits, KeyTraits> ImplType;76 typedef HashTable<KeyType, ValueType, PairFirstExtractor<KeyType, MappedType>, HashFunctions, ValueTraits, KeyTraits> ImplType; 71 77 typedef HashMapTranslator<Key, Mapped, HashFunctions> TranslatorType; 72 78 public:
Note:
See TracChangeset
for help on using the changeset viewer.