30#ifndef __CLAW_FUNCTIONAL_HPP__
31#define __CLAW_FUNCTIONAL_HPP__
42 template <
class T1,
class T2>
43 class first :
public std::unary_function<std::pair<T1, T2>, T1&>
46 T1& operator()(std::pair<T1, T2>& p)
const
56 template <
class T1,
class T2>
58 :
public std::unary_function<const std::pair<T1, T2>, const T1&>
61 const T1& operator()(
const std::pair<T1, T2>& p)
const
76 :
public first<typename Pair::first_type, typename Pair::second_type>
89 :
public const_first<typename Pair::first_type, typename Pair::second_type>
98 template <
class T1,
class T2>
99 class second :
public std::unary_function<std::pair<T1, T2>, T2&>
102 T2& operator()(std::pair<T1, T2>& p)
const
112 template <
class T1,
class T2>
114 :
public std::unary_function<const std::pair<T1, T2>, const T2&>
117 const T2& operator()(
const std::pair<T1, T2>& p)
const
130 template <
class Pair>
132 :
public second<typename Pair::first_type, typename Pair::second_type>
143 template <
class Pair>
144 class const_pair_second
146 typename Pair::second_type>
152 template <
typename F,
typename S>
172 bool operator()(
const T& t)
const
189 template <
class T,
class U>
193 bool operator()(
const T& t,
const U& u)
const
210 template <
typename F1,
typename F2>
212 :
public std::unary_function<typename F2::argument_type,
213 typename F1::result_type>
226 template <
typename G1,
typename G2>
233 typename F1::result_type
operator()(
typename F2::argument_type& a)
const
235 return F1()(F2()(a));
248 template <
typename T>
252 void operator()(
const T& a)
const
267 template <
typename T>
268 class clone :
public std::unary_function<T*, T*>
271 T* operator()(
const T* a)
const
285 template <
typename T>
289 T& operator()(T* a)
const
304 template <
typename T>
305 class const_dereference :
public std::unary_function<const T*, const T&>
312 const_dereference(
const const_dereference<T>&)
315 const T& operator()(
const T* a)
const
Always true binary predicate.
Function object that clones a pointer.
Fuction object to get the first element of a std::pair.
Fuction object to get the first element of a std::pair.
Fuction object to get the second element of a std::pair.
Function object that deletes a pointer.
Function object that dereferences a pointer.
Fuction object to get the first element of a std::pair.
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 second element of a std::pair.
unary_compose(const unary_compose< G1, G2 > &that)
Copy constructor.
F1::result_type operator()(typename F2::argument_type &a) const
Return (F1 o F2)(a).
Always true unary predicate.
This is the main namespace.