Changes in src/helpers.hpp [6e97e5:7dad10]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/helpers.hpp
r6e97e5 r7dad10 189 189 #define PLURAL_S(v) (((v)==1)?"":"s") 190 190 191 // this is to allow different modes of access for192 // maps and sets193 template<typename Res,typename T>194 struct _take{195 Res get(T value) const;196 };197 198 // if we have a set,vector etc we can directly access the result199 template<typename Res>200 struct _take<Res,Res>{201 static inline Res get(Res value){202 return value;203 }204 };205 206 // if we have a map we have to access the second part of207 // the pair208 template<typename Res,typename T1>209 struct _take<Res,std::pair<T1,Res> >{210 static inline Res get(std::pair<T1,Res> value){211 return value.second;212 }213 };214 215 191 #endif /*HELPERS_HPP_*/
Note:
See TracChangeset
for help on using the changeset viewer.