aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2005-05-02 12:03:15 (GMT)
committerfluxgen <fluxgen>2005-05-02 12:03:15 (GMT)
commit6b943ec69ada6ba8c7b0a8305f048df8ef07f961 (patch)
treeec469c2c2cc912cb6afa7feaac8fdc146bae6013
parentd8b8934089021b1f3003cc77a8f74c7f872d88fc (diff)
downloadfluxbox_pavel-6b943ec69ada6ba8c7b0a8305f048df8ef07f961.zip
fluxbox_pavel-6b943ec69ada6ba8c7b0a8305f048df8ef07f961.tar.bz2
select 2nd element in pair
-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