summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/FbTk/Select2nd.hh18
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
6namespace FbTk {
7
8template <class A>
9class Select2nd:public std::unary_function<A, typename A::second_type> {
10public:
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