30#ifndef _STLP_INTERNAL_FUNCTION_H
31#define _STLP_INTERNAL_FUNCTION_H
33#ifndef _STLP_TYPE_TRAITS_H
37#ifndef _STLP_INTERNAL_FUNCTION_BASE_H
45 bool operator()(
const _Tp& __x,
const _Tp& __y)
const {
return __x != __y; }
50 bool operator()(
const _Tp& __x,
const _Tp& __y)
const {
return __x > __y; }
55 bool operator()(
const _Tp& __x,
const _Tp& __y)
const {
return __x >= __y; }
60 bool operator()(
const _Tp& __x,
const _Tp& __y)
const {
return __x <= __y; }
65 _Tp
operator()(
const _Tp& __x,
const _Tp& __y)
const {
return __x / __y; }
70 _Tp
operator()(
const _Tp& __x,
const _Tp& __y)
const {
return __x % __y; }
80 bool operator()(
const _Tp& __x,
const _Tp& __y)
const {
return __x && __y; }
85 bool operator()(
const _Tp& __x,
const _Tp& __y)
const {
return __x || __y; }
93#if !defined (_STLP_NO_EXTENSIONS)
99#if defined (_STLP_BASE_TYPEDEF_BUG)
107template <
class _Pair>
108struct __pair_aux :
private _Pair {
109 typedef typename _Pair::first_type first_type;
110 typedef typename _Pair::second_type second_type;
113template <
class _Operation>
114struct __unary_fun_aux :
private _Operation {
115 typedef typename _Operation::argument_type argument_type;
116 typedef typename _Operation::result_type result_type;
119template <
class _Operation>
120struct __binary_fun_aux :
private _Operation {
121 typedef typename _Operation::first_argument_type first_argument_type;
122 typedef typename _Operation::second_argument_type second_argument_type;
123 typedef typename _Operation::result_type result_type;
126# define __UNARY_ARG(__Operation,__type) __unary_fun_aux<__Operation>::__type
127# define __BINARY_ARG(__Operation,__type) __binary_fun_aux<__Operation>::__type
128# define __PAIR_ARG(__Pair,__type) __pair_aux<__Pair>::__type
130# define __UNARY_ARG(__Operation,__type) __Operation::__type
131# define __BINARY_ARG(__Operation,__type) __Operation::__type
132# define __PAIR_ARG(__Pair,__type) __Pair::__type
135template <
class _Predicate>
137 :
public unary_function<typename __UNARY_ARG(_Predicate, argument_type), bool> {
152template <
class _Predicate>
158template <
class _Predicate>
160 :
public binary_function<typename __BINARY_ARG(_Predicate, first_argument_type),
161 typename __BINARY_ARG(_Predicate, second_argument_type),
181template <
class _Predicate>
187template <
class _Operation>
189 public unary_function<typename __BINARY_ARG(_Operation, second_argument_type),
190 typename __BINARY_ARG(_Operation, result_type) > {
215template <
class _Operation,
class _Tp>
217bind1st(
const _Operation& __fn,
const _Tp& __x) {
218 typedef typename _Operation::first_argument_type _Arg1_type;
222template <
class _Operation>
224 :
public unary_function<typename __BINARY_ARG(_Operation, first_argument_type),
225 typename __BINARY_ARG(_Operation, result_type)> {
238 typename _Operation::second_argument_type
value;
250template <
class _Operation,
class _Tp>
252bind2nd(
const _Operation& __fn,
const _Tp& __x) {
253 typedef typename _Operation::second_argument_type _Arg2_type;
257#if !defined (_STLP_NO_EXTENSIONS)
260template <
class _Operation1,
class _Operation2>
262 public unary_function<typename __UNARY_ARG(_Operation2, argument_type),
263 typename __UNARY_ARG(_Operation1, result_type)> {
283template <
class _Operation1,
class _Operation2>
285compose1(
const _Operation1& __fn1,
const _Operation2& __fn2) {
289template <
class _Operation1,
class _Operation2,
class _Operation3>
291 public unary_function<typename __UNARY_ARG(_Operation2, argument_type),
292 typename __BINARY_ARG(_Operation1, result_type)> {
306 const _Operation3& __z)
314template <
class _Operation1,
class _Operation2,
class _Operation3>
316compose2(
const _Operation1& __fn1,
const _Operation2& __fn2,
317 const _Operation3& __fn3) {
327template <
class _Arg1,
class _Arg2>
330template <
class _Arg1,
class _Arg2>
340template <
class _Result>
351template <
class _Result>
357template <
class _Result, _STLP_DFL_TMPL_PARAM( _Argument , _Result) >
363template <
class _Result, _STLP_DFL_TMPL_PARAM( _Arg1 , _Result), _STLP_DFL_TMPL_PARAM( _Arg2 , _Arg1) >
370template <
class _Result>
375template <
class _Result>
380template <
class _Result>
405 for (__i = 0; __i < 54; __i++) {
411 for (
int __loop = 0; __loop < 4; __loop++) {
412 for (__i = 0; __i < 55; __i++)
_STLP_INLINE_LOOP _InputIter _Predicate __pred
_STLP_INLINE_LOOP _InputIter const _Tp & __val
unary_compose< _Operation1, _Operation2 > compose1(const _Operation1 &__fn1, const _Operation2 &__fn2)
constant_binary_fun< _Result, _Result, _Result > constant2(const _Result &__val)
unary_negate< _Predicate > not1(const _Predicate &__pred)
binary_compose< _Operation1, _Operation2, _Operation3 > compose2(const _Operation1 &__fn1, const _Operation2 &__fn2, const _Operation3 &__fn3)
constant_unary_fun< _Result, _Result > constant1(const _Result &__val)
constant_void_fun< _Result > constant0(const _Result &__val)
binary_negate< _Predicate > not2(const _Predicate &__pred)
#define __BINARY_ARG(__Operation, __type)
binder1st< _Operation > bind1st(const _Operation &__fn, const _Tp &__x)
_Tp identity_element(plus< _Tp >)
binder2nd< _Operation > bind2nd(const _Operation &__fn, const _Tp &__x)
#define __UNARY_ARG(__Operation, __type)
_Base::argument_type argument_type
__call_traits< argument_type >::const_param_type _ArgParamType
result_type operator()(_ArgParamType __x) const
binary_compose(const _Operation1 &__x, const _Operation2 &__y, const _Operation3 &__z)
unary_function< typename __UNARY_ARG(_Operation2, argument_type), typename __BINARY_ARG(_Operation1, result_type)> _Base
_Base::result_type result_type
_Base::second_argument_type second_argument_type
__call_traits< second_argument_type >::const_param_type _SndArgParamType
binary_function< typename __BINARY_ARG(_Predicate, first_argument_type), typename __BINARY_ARG(_Predicate, second_argument_type), bool > _Base
__call_traits< first_argument_type >::const_param_type _FstArgParamType
bool operator()(_FstArgParamType __x, _SndArgParamType __y) const
_Base::first_argument_type first_argument_type
binary_negate(const _Predicate &__x)
binder1st(const _Operation &__x, _ValueParamType __y)
__call_traits< argument_type >::param_type _ArgParamType
_Base::result_type result_type
__call_traits< argument_type >::const_param_type _ConstArgParamType
result_type operator()(_ConstArgParamType __x) const
_Base::argument_type argument_type
unary_function< typename __BINARY_ARG(_Operation, second_argument_type), typename __BINARY_ARG(_Operation, result_type) > _Base
_Operation::first_argument_type _M_value
__call_traits< typename_Operation::first_argument_type >::const_param_type _ValueParamType
result_type operator()(_ArgParamType __x) const
_Base::argument_type argument_type
binder2nd(const _Operation &__x, _ValueParamType __y)
__call_traits< typename_Operation::second_argument_type >::const_param_type _ValueParamType
unary_function< typename __BINARY_ARG(_Operation, first_argument_type), typename __BINARY_ARG(_Operation, result_type)> _Base
__call_traits< argument_type >::param_type _ArgParamType
result_type operator()(_ArgParamType __x) const
__call_traits< argument_type >::const_param_type _ConstArgParamType
_Base::result_type result_type
_Operation::second_argument_type value
result_type operator()(_ConstArgParamType __x) const
_STLP_UINT32_T operator()(_STLP_UINT32_T __limit)
subtractive_rng(unsigned int __seed)
void _M_initialize(_STLP_UINT32_T __seed)
_STLP_UINT32_T _M_table[55]
_Base::result_type result_type
unary_function< typename __UNARY_ARG(_Operation2, argument_type), typename __UNARY_ARG(_Operation1, result_type)> _Base
unary_compose(const _Operation1 &__x, const _Operation2 &__y)
_Base::argument_type argument_type
result_type operator()(_ArgParamType __x) const
__call_traits< argument_type >::const_param_type _ArgParamType
__call_traits< argument_type >::const_param_type _ArgParamType
unary_function< typename __UNARY_ARG(_Predicate, argument_type), bool > _Base
unary_negate(const _Predicate &__x)
bool operator()(_ArgParamType __x) const
_Base::argument_type argument_type
#define _STLP_MOVE_TO_STD_NAMESPACE
#define _STLP_BEGIN_NAMESPACE
#define _STLP_END_NAMESPACE
#define _STLP_MOVE_TO_PRIV_NAMESPACE
_Constant_void_fun(const result_type &__v)
const result_type & operator()() const
const _Tp & const_param_type
_Arg1 first_argument_type
_Arg2 second_argument_type
constant_binary_fun(const _Result &__v)
constant_unary_fun(const _Result &__v)
constant_void_fun(const _Result &__v)
_Tp operator()(const _Tp &__x, const _Tp &__y) const
bool operator()(const _Tp &__x, const _Tp &__y) const
bool operator()(const _Tp &__x, const _Tp &__y) const
bool operator()(const _Tp &__x, const _Tp &__y) const
bool operator()(const _Tp &__x, const _Tp &__y) const
bool operator()(const _Tp &__x) const
bool operator()(const _Tp &__x, const _Tp &__y) const
_Tp operator()(const _Tp &__x, const _Tp &__y) const
_Tp operator()(const _Tp &__x) const
bool operator()(const _Tp &__x, const _Tp &__y) const