aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Select2nd.hh
blob: e74ea0b3a86f026d5775a63f6092c2e5f352154f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef FBTK_SELECT2ND_HH
#define FBTK_SELECT2ND_HH

#include <functional>

namespace FbTk {

template <class A>
class Select2nd:public std::unary_function<A, typename A::second_type> {
public:
    typename A::second_type operator () (const A &arg) const {
        return arg.second;
    }
};

} // namespace FbTk

#endif // FBTK_SELECT2ND_HH