equal
deleted
inserted
replaced
204 /// @} |
204 /// @} |
205 |
205 |
206 /// \addtogroup map_adaptors |
206 /// \addtogroup map_adaptors |
207 /// @{ |
207 /// @{ |
208 |
208 |
|
209 /// \brief Identity mapping. |
|
210 /// |
|
211 /// This mapping gives back the given key as value without any |
|
212 /// modification. |
|
213 template <typename T> |
|
214 class IdentityMap { |
|
215 public: |
|
216 typedef T Key; |
|
217 typedef T Value; |
|
218 |
|
219 const Value& operator[](const Key& t) const { |
|
220 return t; |
|
221 } |
|
222 }; |
209 |
223 |
210 ///Convert the \c Value of a maps to another type. |
224 ///Convert the \c Value of a maps to another type. |
211 |
225 |
212 ///This \ref concept::ReadMap "read only map" |
226 ///This \ref concept::ReadMap "read only map" |
213 ///converts the \c Value of a maps to type \c T. |
227 ///converts the \c Value of a maps to type \c T. |