aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Compose.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/Compose.hh')
-rw-r--r--src/FbTk/Compose.hh12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/FbTk/Compose.hh b/src/FbTk/Compose.hh
index 04267e6..5bca2cb 100644
--- a/src/FbTk/Compose.hh
+++ b/src/FbTk/Compose.hh
@@ -29,16 +29,12 @@ namespace FbTk {
29/// Composes two functions into one. 29/// Composes two functions into one.
30/// Uses Arg for type B and then calls type A 30/// Uses Arg for type B and then calls type A
31template <class A, class B> 31template <class A, class B>
32class Compose_base: public std::unary_function<typename B::argument_type, typename A::result_type> { 32class Compose_base {
33public: 33public:
34 typedef typename A::result_type ResultTypeA;
35 typedef typename A::argument_type ArgumentTypeA;
36 typedef typename B::result_type ResultTypeB;
37 typedef typename B::argument_type ArgumentTypeB;
38
39 Compose_base(const A &a, const B &b):m_a(a), m_b(b) { } 34 Compose_base(const A &a, const B &b):m_a(a), m_b(b) { }
40 ResultTypeA operator () (const ArgumentTypeB &arg) const { 35 template <class ARG>
41 return m_a(m_b(arg)); 36 auto operator () (const ARG& arg) const {
37 return m_a(m_b(arg));
42 } 38 }
43 39
44private: 40private: