diff options
Diffstat (limited to 'src/FbTk/Select2nd.hh')
-rw-r--r-- | src/FbTk/Select2nd.hh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/FbTk/Select2nd.hh b/src/FbTk/Select2nd.hh new file mode 100644 index 0000000..e74ea0b --- /dev/null +++ b/src/FbTk/Select2nd.hh | |||
@@ -0,0 +1,18 @@ | |||
1 | #ifndef FBTK_SELECT2ND_HH | ||
2 | #define FBTK_SELECT2ND_HH | ||
3 | |||
4 | #include <functional> | ||
5 | |||
6 | namespace FbTk { | ||
7 | |||
8 | template <class A> | ||
9 | class Select2nd:public std::unary_function<A, typename A::second_type> { | ||
10 | public: | ||
11 | typename A::second_type operator () (const A &arg) const { | ||
12 | return arg.second; | ||
13 | } | ||
14 | }; | ||
15 | |||
16 | } // namespace FbTk | ||
17 | |||
18 | #endif // FBTK_SELECT2ND_HH | ||