select 2nd element in pair
This commit is contained in:
parent
d8b8934089
commit
6b943ec69a
1 changed files with 18 additions and 0 deletions
18
src/FbTk/Select2nd.hh
Normal file
18
src/FbTk/Select2nd.hh
Normal file
|
@ -0,0 +1,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
|
Loading…
Reference in a new issue