30 #ifndef __CLAW_FUNCTIONAL_HPP__ 31 #define __CLAW_FUNCTIONAL_HPP__ 41 template <
class T1,
class T2>
45 using argument_type = std::pair<T1, T2>&;
46 using result_type = T1&;
49 T1& operator()(std::pair<T1, T2>& p)
const 59 template <
class T1,
class T2>
63 using argument_type =
const std::pair<T1, T2>&;
64 using result_type =
const T1&;
67 const T1& operator()(
const std::pair<T1, T2>& p)
const 82 :
public first<typename Pair::first_type, typename Pair::second_type>
95 :
public const_first<typename Pair::first_type, typename Pair::second_type>
104 template <
class T1,
class T2>
108 using argument_type = std::pair<T1, T2>&;
109 using result_type = T2&;
112 T2& operator()(std::pair<T1, T2>& p)
const 122 template <
class T1,
class T2>
126 using argument_type =
const std::pair<T1, T2>&;
127 using result_type =
const T2&;
130 const T2& operator()(
const std::pair<T1, T2>& p)
const 143 template <
class Pair>
145 :
public second<typename Pair::first_type, typename Pair::second_type>
156 template <
class Pair>
159 typename Pair::second_type>
165 template <
typename F,
typename S>
185 using argument_type =
const T&;
186 using result_type = bool;
189 bool operator()(
const T& t)
const 206 template <
class T,
class U>
210 using first_argument_type =
const T&;
211 using second_argument_type =
const U&;
212 using result_type = bool;
215 bool operator()(
const T& t,
const U& u)
const 232 template <
typename F1,
typename F2>
236 using argument_type =
typename F2::argument_type;
237 using result_type =
typename F1::result_type;
250 template <
typename G1,
typename G2>
257 typename F1::result_type
operator()(
typename F2::argument_type& a)
const 259 return F1()(F2()(a));
272 template <
typename T>
276 using argument_type =
const T&;
277 using result_type = void;
280 void operator()(
const T& a)
const 295 template <
typename T>
299 using argument_type =
const T*;
300 using result_type = T*;
303 T* operator()(
const T* a)
const 317 template <
typename T>
321 using argument_type = T*;
322 using result_type = T&;
325 T& operator()(T* a)
const 340 template <
typename T>
344 using argument_type =
const T*;
345 using result_type =
const T&;
355 const T& operator()(
const T* a)
const 363 #endif // __CLAW_FUNCTIONAL_HPP__ Function object that deletes a pointer.
Always true unary predicate.
Fuction object to get the second element of a std::pair.
Function object that clones a pointer.
unary_compose(const unary_compose< G1, G2 > &that)
Copy constructor.
Fuction object to get the first element of a std::pair.
Fuction object to get the second element of a std::pair.
Always true binary predicate.
Fuction object to get the first element of a std::pair.
Fuction object to get the second element of a std::pair.
Fuction object to get the first element of a std::pair.
Function object that dereferences a pointer.
Function object that dereferences a constant pointer.
F1::result_type operator()(typename F2::argument_type &a) const
Return (F1 o F2)(a).
Function object that compose two function objects.
Fuction object to get the second element of a std::pair.
Fuction object to get the first element of a std::pair.
This is the main namespace.