the whole game
This commit is contained in:
17
src/util/CollectionUtils.h
Executable file
17
src/util/CollectionUtils.h
Executable file
@@ -0,0 +1,17 @@
|
||||
#ifndef COLLECTIONUTILS_H__
|
||||
#define COLLECTIONUTILS_H__
|
||||
|
||||
struct PairKeyFunctor {
|
||||
template <typename T>
|
||||
typename T::first_type operator()(T& pair) const {
|
||||
return pair.first;
|
||||
}
|
||||
};
|
||||
struct PairValueFunctor {
|
||||
template <typename T>
|
||||
typename T::second_type operator()(T& pair) const {
|
||||
return pair.second;
|
||||
}
|
||||
};
|
||||
|
||||
#endif /*COLLECTIONUTILS_H__*/
|
||||
Reference in New Issue
Block a user