diff options
author | fluxgen <fluxgen> | 2005-05-02 12:03:15 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2005-05-02 12:03:15 (GMT) |
commit | 6b943ec69ada6ba8c7b0a8305f048df8ef07f961 (patch) | |
tree | ec469c2c2cc912cb6afa7feaac8fdc146bae6013 /src | |
parent | d8b8934089021b1f3003cc77a8f74c7f872d88fc (diff) | |
download | fluxbox-6b943ec69ada6ba8c7b0a8305f048df8ef07f961.zip fluxbox-6b943ec69ada6ba8c7b0a8305f048df8ef07f961.tar.bz2 |
select 2nd element in pair
Diffstat (limited to 'src')
-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 | ||