13 #ifndef ESYS_LSMFUNCTIONAL_H
14 #define ESYS_LSMFUNCTIONAL_H
20 #if HAVE_EXT_FUNCTIONAL
21 #include <ext/functional>
27 #if HAVE_STD__SELECT1ST_PAIR_
29 template <
class _Pair>
struct select1st
30 :
public std::select1st<_Pair> {};
32 #elif HAVE___GNU_CXX__SELECT1ST_PAIR_
34 template <
class _Pair>
struct select1st
35 :
public __gnu_cxx::select1st<_Pair> {};
37 #elif !HAVE_EXT__SELECT1ST_PAIR_
40 template <
class _Pair>
42 :
public std::unary_function<_Pair, typename _Pair::first_type>
44 typename _Pair::first_type&
45 operator()(_Pair& __x)
const
48 const typename _Pair::first_type&
49 operator()(
const _Pair& __x)
const
55 #if HAVE_STD__SELECT2ND_PAIR_
57 template <
class _Pair>
struct select2nd
58 :
public std::select2nd<_Pair> {};
60 #elif HAVE___GNU_CXX__SELECT2ND_PAIR_
62 template <
class _Pair>
struct select2nd
63 :
public __gnu_cxx::select2nd<_Pair> {};
65 #elif !HAVE_EXT__SELECT2ND_PAIR_
68 template <
class _Pair>
70 :
public std::unary_function<_Pair, typename _Pair::second_type>
72 typename _Pair::second_type&
73 operator()(_Pair& __x)
const
74 {
return __x.second; }
76 const typename _Pair::second_type&
77 operator()(
const _Pair& __x)
const
78 {
return __x.second; }