1.1 --- a/epoc32/include/stdapis/stlportv5/stl/_function.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ b/epoc32/include/stdapis/stlportv5/stl/_function.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -9,13 +9,13 @@
1.4 * Copyright (c) 1997
1.5 * Moscow Center for SPARC Technology
1.6 *
1.7 - * Copyright (c) 1999
1.8 + * Copyright (c) 1999
1.9 * Boris Fomitchev
1.10 *
1.11 * This material is provided "as is", with absolutely no warranty expressed
1.12 * or implied. Any use is at your own risk.
1.13 *
1.14 - * Permission to use or copy this software for any purpose is hereby granted
1.15 + * Permission to use or copy this software for any purpose is hereby granted
1.16 * without fee, provided the above notices are retained on all copies.
1.17 * Permission to modify the code and to distribute modified code is granted,
1.18 * provided the above notices are retained, and a notice that the code was
1.19 @@ -30,19 +30,73 @@
1.20 #ifndef _STLP_INTERNAL_FUNCTION_H
1.21 #define _STLP_INTERNAL_FUNCTION_H
1.22
1.23 +#ifndef _STLP_TYPE_TRAITS_H
1.24 +# include <stl/type_traits.h>
1.25 +#endif
1.26 +
1.27 #ifndef _STLP_INTERNAL_FUNCTION_BASE_H
1.28 -#include <stl/_function_base.h>
1.29 +# include <stl/_function_base.h>
1.30 #endif
1.31
1.32 _STLP_BEGIN_NAMESPACE
1.33
1.34 -# ifndef _STLP_NO_EXTENSIONS
1.35 +template <class _Tp>
1.36 +struct not_equal_to : public binary_function<_Tp, _Tp, bool> {
1.37 + bool operator()(const _Tp& __x, const _Tp& __y) const { return __x != __y; }
1.38 +};
1.39 +
1.40 +template <class _Tp>
1.41 +struct greater : public binary_function<_Tp, _Tp, bool> {
1.42 + bool operator()(const _Tp& __x, const _Tp& __y) const { return __x > __y; }
1.43 +};
1.44 +
1.45 +template <class _Tp>
1.46 +struct greater_equal : public binary_function<_Tp, _Tp, bool> {
1.47 + bool operator()(const _Tp& __x, const _Tp& __y) const { return __x >= __y; }
1.48 +};
1.49 +
1.50 +template <class _Tp>
1.51 +struct less_equal : public binary_function<_Tp, _Tp, bool> {
1.52 + bool operator()(const _Tp& __x, const _Tp& __y) const { return __x <= __y; }
1.53 +};
1.54 +
1.55 +template <class _Tp>
1.56 +struct divides : public binary_function<_Tp, _Tp, _Tp> {
1.57 + _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x / __y; }
1.58 +};
1.59 +
1.60 +template <class _Tp>
1.61 +struct modulus : public binary_function<_Tp, _Tp, _Tp> {
1.62 + _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x % __y; }
1.63 +};
1.64 +
1.65 +template <class _Tp>
1.66 +struct negate : public unary_function<_Tp, _Tp> {
1.67 + _Tp operator()(const _Tp& __x) const { return -__x; }
1.68 +};
1.69 +
1.70 +template <class _Tp>
1.71 +struct logical_and : public binary_function<_Tp, _Tp, bool> {
1.72 + bool operator()(const _Tp& __x, const _Tp& __y) const { return __x && __y; }
1.73 +};
1.74 +
1.75 +template <class _Tp>
1.76 +struct logical_or : public binary_function<_Tp, _Tp,bool> {
1.77 + bool operator()(const _Tp& __x, const _Tp& __y) const { return __x || __y; }
1.78 +};
1.79 +
1.80 +template <class _Tp>
1.81 +struct logical_not : public unary_function<_Tp, bool> {
1.82 + bool operator()(const _Tp& __x) const { return !__x; }
1.83 +};
1.84 +
1.85 +#if !defined (_STLP_NO_EXTENSIONS)
1.86 // identity_element (not part of the C++ standard).
1.87 template <class _Tp> inline _Tp identity_element(plus<_Tp>) { return _Tp(0); }
1.88 template <class _Tp> inline _Tp identity_element(multiplies<_Tp>) { return _Tp(1); }
1.89 -# endif
1.90 +#endif
1.91
1.92 -# if defined (_STLP_BASE_TYPEDEF_BUG)
1.93 +#if defined (_STLP_BASE_TYPEDEF_BUG)
1.94 // this workaround is needed for SunPro 4.0.1
1.95 // suggested by "Martin Abernethy" <gma@paston.co.uk>:
1.96
1.97 @@ -51,226 +105,232 @@
1.98 // as type parameters. SUN C++ 4.0.1 compiler gives errors for template type parameters
1.99 // of the form 'name1::name2', where name1 is itself a type parameter.
1.100 template <class _Pair>
1.101 -struct __pair_aux : private _Pair
1.102 -{
1.103 - typedef typename _Pair::first_type first_type;
1.104 - typedef typename _Pair::second_type second_type;
1.105 +struct __pair_aux : private _Pair {
1.106 + typedef typename _Pair::first_type first_type;
1.107 + typedef typename _Pair::second_type second_type;
1.108 };
1.109
1.110 template <class _Operation>
1.111 -struct __unary_fun_aux : private _Operation
1.112 -{
1.113 - typedef typename _Operation::argument_type argument_type;
1.114 - typedef typename _Operation::result_type result_type;
1.115 +struct __unary_fun_aux : private _Operation {
1.116 + typedef typename _Operation::argument_type argument_type;
1.117 + typedef typename _Operation::result_type result_type;
1.118 };
1.119
1.120 template <class _Operation>
1.121 -struct __binary_fun_aux : private _Operation
1.122 -{
1.123 - typedef typename _Operation::first_argument_type first_argument_type;
1.124 - typedef typename _Operation::second_argument_type second_argument_type;
1.125 - typedef typename _Operation::result_type result_type;
1.126 +struct __binary_fun_aux : private _Operation {
1.127 + typedef typename _Operation::first_argument_type first_argument_type;
1.128 + typedef typename _Operation::second_argument_type second_argument_type;
1.129 + typedef typename _Operation::result_type result_type;
1.130 };
1.131
1.132 # define __UNARY_ARG(__Operation,__type) __unary_fun_aux<__Operation>::__type
1.133 # define __BINARY_ARG(__Operation,__type) __binary_fun_aux<__Operation>::__type
1.134 # define __PAIR_ARG(__Pair,__type) __pair_aux<__Pair>::__type
1.135 -# else
1.136 +#else
1.137 # define __UNARY_ARG(__Operation,__type) __Operation::__type
1.138 # define __BINARY_ARG(__Operation,__type) __Operation::__type
1.139 # define __PAIR_ARG(__Pair,__type) __Pair::__type
1.140 -# endif
1.141 +#endif
1.142
1.143 template <class _Predicate>
1.144 -class unary_negate :
1.145 - public unary_function<typename __UNARY_ARG(_Predicate,argument_type), bool> {
1.146 +class unary_negate
1.147 + : public unary_function<typename __UNARY_ARG(_Predicate, argument_type), bool> {
1.148 + typedef unary_function<typename __UNARY_ARG(_Predicate, argument_type), bool> _Base;
1.149 +public:
1.150 + typedef typename _Base::argument_type argument_type;
1.151 +private:
1.152 + typedef typename __call_traits<argument_type>::param_type _ArgParamType;
1.153 protected:
1.154 _Predicate _M_pred;
1.155 public:
1.156 explicit unary_negate(const _Predicate& __x) : _M_pred(__x) {}
1.157 - bool operator()(const typename _Predicate::argument_type& __x) const {
1.158 + bool operator()(_ArgParamType __x) const {
1.159 return !_M_pred(__x);
1.160 }
1.161 };
1.162
1.163 template <class _Predicate>
1.164 -inline unary_negate<_Predicate>
1.165 -not1(const _Predicate& __pred)
1.166 -{
1.167 +inline unary_negate<_Predicate>
1.168 +not1(const _Predicate& __pred) {
1.169 return unary_negate<_Predicate>(__pred);
1.170 }
1.171
1.172 -template <class _Predicate>
1.173 -class binary_negate
1.174 - : public binary_function<typename __BINARY_ARG(_Predicate,first_argument_type),
1.175 - typename __BINARY_ARG(_Predicate,second_argument_type),
1.176 +template <class _Predicate>
1.177 +class binary_negate
1.178 + : public binary_function<typename __BINARY_ARG(_Predicate, first_argument_type),
1.179 + typename __BINARY_ARG(_Predicate, second_argument_type),
1.180 bool> {
1.181 + typedef binary_function<typename __BINARY_ARG(_Predicate, first_argument_type),
1.182 + typename __BINARY_ARG(_Predicate, second_argument_type),
1.183 + bool> _Base;
1.184 +public:
1.185 + typedef typename _Base::first_argument_type first_argument_type;
1.186 + typedef typename _Base::second_argument_type second_argument_type;
1.187 +private:
1.188 + typedef typename __call_traits<first_argument_type>::param_type _FstArgParamType;
1.189 + typedef typename __call_traits<second_argument_type>::param_type _SndArgParamType;
1.190 protected:
1.191 _Predicate _M_pred;
1.192 public:
1.193 explicit binary_negate(const _Predicate& __x) : _M_pred(__x) {}
1.194 - bool operator()(const typename _Predicate::first_argument_type& __x,
1.195 - const typename _Predicate::second_argument_type& __y) const
1.196 - {
1.197 - return !_M_pred(__x, __y);
1.198 + bool operator()(_FstArgParamType __x, _SndArgParamType __y) const {
1.199 + return !_M_pred(__x, __y);
1.200 }
1.201 };
1.202
1.203 template <class _Predicate>
1.204 -inline binary_negate<_Predicate>
1.205 -not2(const _Predicate& __pred)
1.206 -{
1.207 +inline binary_negate<_Predicate>
1.208 +not2(const _Predicate& __pred) {
1.209 return binary_negate<_Predicate>(__pred);
1.210 }
1.211
1.212 -template <class _Operation>
1.213 -class binder1st :
1.214 - public unary_function<typename __BINARY_ARG(_Operation,second_argument_type),
1.215 - typename __BINARY_ARG(_Operation,result_type) > {
1.216 +template <class _Operation>
1.217 +class binder1st :
1.218 + public unary_function<typename __BINARY_ARG(_Operation, second_argument_type),
1.219 + typename __BINARY_ARG(_Operation, result_type) > {
1.220 + typedef unary_function<typename __BINARY_ARG(_Operation, second_argument_type),
1.221 + typename __BINARY_ARG(_Operation, result_type) > _Base;
1.222 +public:
1.223 + typedef typename _Base::argument_type argument_type;
1.224 + typedef typename _Base::result_type result_type;
1.225 +private:
1.226 + typedef typename __call_traits<argument_type>::param_type _ArgParamType;
1.227 + typedef typename __call_traits<typename _Operation::first_argument_type>::param_type _ValueParamType;
1.228 protected:
1.229 + //op is a Standard name (20.3.6.1), do no make it STLport naming convention compliant.
1.230 _Operation op;
1.231 - typename _Operation::first_argument_type value;
1.232 + typename _Operation::first_argument_type _M_value;
1.233 public:
1.234 - binder1st(const _Operation& __x,
1.235 - const typename _Operation::first_argument_type& __y)
1.236 - : op(__x), value(__y) {}
1.237 + binder1st(const _Operation& __x, _ValueParamType __y)
1.238 + : op(__x), _M_value(__y) {}
1.239
1.240 - typename _Operation::result_type
1.241 - operator()(const typename _Operation::second_argument_type& __x) const {
1.242 - return op(value, __x);
1.243 - }
1.244 -
1.245 - typename _Operation::result_type
1.246 - operator()(typename _Operation::second_argument_type& __x) const {
1.247 - return op(value, __x);
1.248 + result_type operator()(_ArgParamType __x) const {
1.249 + return op(_M_value, __x);
1.250 }
1.251 };
1.252
1.253 template <class _Operation, class _Tp>
1.254 -inline binder1st<_Operation>
1.255 -bind1st(const _Operation& __fn, const _Tp& __x)
1.256 -{
1.257 +inline binder1st<_Operation>
1.258 +bind1st(const _Operation& __fn, const _Tp& __x) {
1.259 typedef typename _Operation::first_argument_type _Arg1_type;
1.260 return binder1st<_Operation>(__fn, _Arg1_type(__x));
1.261 }
1.262
1.263 -template <class _Operation>
1.264 +template <class _Operation>
1.265 class binder2nd
1.266 - : public unary_function<typename __BINARY_ARG(_Operation,first_argument_type),
1.267 - typename __BINARY_ARG(_Operation,result_type)> {
1.268 + : public unary_function<typename __BINARY_ARG(_Operation, first_argument_type),
1.269 + typename __BINARY_ARG(_Operation, result_type)> {
1.270 + typedef unary_function<typename __BINARY_ARG(_Operation, first_argument_type),
1.271 + typename __BINARY_ARG(_Operation, result_type)> _Base;
1.272 +public:
1.273 + typedef typename _Base::argument_type argument_type;
1.274 + typedef typename _Base::result_type result_type;
1.275 +private:
1.276 + typedef typename __call_traits<argument_type>::param_type _ArgParamType;
1.277 + typedef typename __call_traits<typename _Operation::second_argument_type>::param_type _ValueParamType;
1.278 protected:
1.279 + //op is a Standard name (20.3.6.3), do no make it STLport naming convention compliant.
1.280 _Operation op;
1.281 typename _Operation::second_argument_type value;
1.282 public:
1.283 - binder2nd(const _Operation& __x,
1.284 - const typename _Operation::second_argument_type& __y)
1.285 + binder2nd(const _Operation& __x, _ValueParamType __y)
1.286 : op(__x), value(__y) {}
1.287
1.288 - typename _Operation::result_type
1.289 - operator()(const typename _Operation::first_argument_type& __x) const {
1.290 - return op(__x, value);
1.291 - }
1.292 -
1.293 - typename _Operation::result_type
1.294 - operator()(typename _Operation::first_argument_type& __x) const {
1.295 - return op(__x, value);
1.296 + result_type operator()(_ArgParamType __x) const {
1.297 + return op(__x, value);
1.298 }
1.299 };
1.300
1.301 template <class _Operation, class _Tp>
1.302 -inline binder2nd<_Operation>
1.303 -bind2nd(const _Operation& __fn, const _Tp& __x)
1.304 -{
1.305 +inline binder2nd<_Operation>
1.306 +bind2nd(const _Operation& __fn, const _Tp& __x) {
1.307 typedef typename _Operation::second_argument_type _Arg2_type;
1.308 return binder2nd<_Operation>(__fn, _Arg2_type(__x));
1.309 }
1.310
1.311 -# ifndef _STLP_NO_EXTENSIONS
1.312 +#if !defined (_STLP_NO_EXTENSIONS)
1.313 // unary_compose and binary_compose (extensions, not part of the standard).
1.314
1.315 template <class _Operation1, class _Operation2>
1.316 -class unary_compose :
1.317 - public unary_function<typename __UNARY_ARG(_Operation2,argument_type),
1.318 - typename __UNARY_ARG(_Operation1,result_type)> {
1.319 +class unary_compose :
1.320 + public unary_function<typename __UNARY_ARG(_Operation2, argument_type),
1.321 + typename __UNARY_ARG(_Operation1, result_type)> {
1.322 + typedef unary_function<typename __UNARY_ARG(_Operation2, argument_type),
1.323 + typename __UNARY_ARG(_Operation1, result_type)> _Base;
1.324 +public:
1.325 + typedef typename _Base::argument_type argument_type;
1.326 + typedef typename _Base::result_type result_type;
1.327 +private:
1.328 + typedef typename __call_traits<argument_type>::param_type _ArgParamType;
1.329 protected:
1.330 _Operation1 _M_fn1;
1.331 _Operation2 _M_fn2;
1.332 public:
1.333 - unary_compose(const _Operation1& __x, const _Operation2& __y)
1.334 + unary_compose(const _Operation1& __x, const _Operation2& __y)
1.335 : _M_fn1(__x), _M_fn2(__y) {}
1.336
1.337 - typename _Operation1::result_type
1.338 - operator()(const typename _Operation2::argument_type& __x) const {
1.339 - return _M_fn1(_M_fn2(__x));
1.340 - }
1.341 -
1.342 - typename _Operation1::result_type
1.343 - operator()(typename _Operation2::argument_type& __x) const {
1.344 + result_type operator()(_ArgParamType __x) const {
1.345 return _M_fn1(_M_fn2(__x));
1.346 }
1.347 };
1.348
1.349 template <class _Operation1, class _Operation2>
1.350 -inline unary_compose<_Operation1,_Operation2>
1.351 -compose1(const _Operation1& __fn1, const _Operation2& __fn2)
1.352 -{
1.353 +inline unary_compose<_Operation1,_Operation2>
1.354 +compose1(const _Operation1& __fn1, const _Operation2& __fn2) {
1.355 return unary_compose<_Operation1,_Operation2>(__fn1, __fn2);
1.356 }
1.357
1.358 template <class _Operation1, class _Operation2, class _Operation3>
1.359 -class binary_compose :
1.360 - public unary_function<typename __UNARY_ARG(_Operation2,argument_type),
1.361 - typename __BINARY_ARG(_Operation1,result_type)> {
1.362 +class binary_compose :
1.363 + public unary_function<typename __UNARY_ARG(_Operation2, argument_type),
1.364 + typename __BINARY_ARG(_Operation1, result_type)> {
1.365 + typedef unary_function<typename __UNARY_ARG(_Operation2, argument_type),
1.366 + typename __BINARY_ARG(_Operation1, result_type)> _Base;
1.367 +public:
1.368 + typedef typename _Base::argument_type argument_type;
1.369 + typedef typename _Base::result_type result_type;
1.370 +private:
1.371 + typedef typename __call_traits<argument_type>::param_type _ArgParamType;
1.372 protected:
1.373 _Operation1 _M_fn1;
1.374 _Operation2 _M_fn2;
1.375 _Operation3 _M_fn3;
1.376 public:
1.377 - binary_compose(const _Operation1& __x, const _Operation2& __y,
1.378 - const _Operation3& __z)
1.379 + binary_compose(const _Operation1& __x, const _Operation2& __y,
1.380 + const _Operation3& __z)
1.381 : _M_fn1(__x), _M_fn2(__y), _M_fn3(__z) { }
1.382
1.383 - typename _Operation1::result_type
1.384 - operator()(const typename _Operation2::argument_type& __x) const {
1.385 - return _M_fn1(_M_fn2(__x), _M_fn3(__x));
1.386 - }
1.387 -
1.388 - typename _Operation1::result_type
1.389 - operator()(typename _Operation2::argument_type& __x) const {
1.390 + result_type operator()(_ArgParamType __x) const {
1.391 return _M_fn1(_M_fn2(__x), _M_fn3(__x));
1.392 }
1.393 };
1.394
1.395 template <class _Operation1, class _Operation2, class _Operation3>
1.396 -inline binary_compose<_Operation1, _Operation2, _Operation3>
1.397 -compose2(const _Operation1& __fn1, const _Operation2& __fn2,
1.398 - const _Operation3& __fn3)
1.399 -{
1.400 - return binary_compose<_Operation1,_Operation2,_Operation3>
1.401 - (__fn1, __fn2, __fn3);
1.402 +inline binary_compose<_Operation1, _Operation2, _Operation3>
1.403 +compose2(const _Operation1& __fn1, const _Operation2& __fn2,
1.404 + const _Operation3& __fn3) {
1.405 + return binary_compose<_Operation1,_Operation2,_Operation3>(__fn1, __fn2, __fn3);
1.406 }
1.407
1.408 -# endif /* _STLP_NO_EXTENSIONS */
1.409 -
1.410 -# ifndef _STLP_NO_EXTENSIONS
1.411 -
1.412 // identity is an extension: it is not part of the standard.
1.413 -template <class _Tp> struct identity : public _Identity<_Tp> {};
1.414 +template <class _Tp> struct identity : public _STLP_PRIV _Identity<_Tp> {};
1.415 // select1st and select2nd are extensions: they are not part of the standard.
1.416 -template <class _Pair> struct select1st : public _Select1st<_Pair> {};
1.417 -template <class _Pair> struct select2nd : public _Select2nd<_Pair> {};
1.418 -
1.419 -template <class _Arg1, class _Arg2>
1.420 -struct project1st : public _Project1st<_Arg1, _Arg2> {};
1.421 +template <class _Pair> struct select1st : public _STLP_PRIV _Select1st<_Pair> {};
1.422 +template <class _Pair> struct select2nd : public _STLP_PRIV _Select2nd<_Pair> {};
1.423
1.424 template <class _Arg1, class _Arg2>
1.425 -struct project2nd : public _Project2nd<_Arg1, _Arg2> {};
1.426 +struct project1st : public _STLP_PRIV _Project1st<_Arg1, _Arg2> {};
1.427 +
1.428 +template <class _Arg1, class _Arg2>
1.429 +struct project2nd : public _STLP_PRIV _Project2nd<_Arg1, _Arg2> {};
1.430
1.431
1.432 // constant_void_fun, constant_unary_fun, and constant_binary_fun are
1.433 // extensions: they are not part of the standard. (The same, of course,
1.434 // is true of the helper functions constant0, constant1, and constant2.)
1.435
1.436 +_STLP_MOVE_TO_PRIV_NAMESPACE
1.437 +
1.438 template <class _Result>
1.439 struct _Constant_void_fun {
1.440 typedef _Result result_type;
1.441 @@ -278,45 +338,42 @@
1.442
1.443 _Constant_void_fun(const result_type& __v) : _M_val(__v) {}
1.444 const result_type& operator()() const { return _M_val; }
1.445 -};
1.446 +};
1.447
1.448 +_STLP_MOVE_TO_STD_NAMESPACE
1.449
1.450 template <class _Result>
1.451 -struct constant_void_fun : public _Constant_void_fun<_Result> {
1.452 - constant_void_fun(const _Result& __v) : _Constant_void_fun<_Result>(__v) {}
1.453 -};
1.454 -
1.455 -template <class _Result, __DFL_TMPL_PARAM( _Argument , _Result) >
1.456 -struct constant_unary_fun : public _Constant_unary_fun<_Result, _Argument>
1.457 -{
1.458 - constant_unary_fun(const _Result& __v)
1.459 - : _Constant_unary_fun<_Result, _Argument>(__v) {}
1.460 +struct constant_void_fun : public _STLP_PRIV _Constant_void_fun<_Result> {
1.461 + constant_void_fun(const _Result& __v)
1.462 + : _STLP_PRIV _Constant_void_fun<_Result>(__v) {}
1.463 };
1.464
1.465 -template <class _Result, __DFL_TMPL_PARAM( _Arg1 , _Result), __DFL_TMPL_PARAM( _Arg2 , _Arg1) >
1.466 +template <class _Result, _STLP_DFL_TMPL_PARAM( _Argument , _Result) >
1.467 +struct constant_unary_fun : public _STLP_PRIV _Constant_unary_fun<_Result, _Argument> {
1.468 + constant_unary_fun(const _Result& __v)
1.469 + : _STLP_PRIV _Constant_unary_fun<_Result, _Argument>(__v) {}
1.470 +};
1.471 +
1.472 +template <class _Result, _STLP_DFL_TMPL_PARAM( _Arg1 , _Result), _STLP_DFL_TMPL_PARAM( _Arg2 , _Arg1) >
1.473 struct constant_binary_fun
1.474 - : public _Constant_binary_fun<_Result, _Arg1, _Arg2>
1.475 -{
1.476 + : public _STLP_PRIV _Constant_binary_fun<_Result, _Arg1, _Arg2> {
1.477 constant_binary_fun(const _Result& __v)
1.478 - : _Constant_binary_fun<_Result, _Arg1, _Arg2>(__v) {}
1.479 + : _STLP_PRIV _Constant_binary_fun<_Result, _Arg1, _Arg2>(__v) {}
1.480 };
1.481
1.482 template <class _Result>
1.483 -inline constant_void_fun<_Result> constant0(const _Result& __val)
1.484 -{
1.485 +inline constant_void_fun<_Result> constant0(const _Result& __val) {
1.486 return constant_void_fun<_Result>(__val);
1.487 }
1.488
1.489 template <class _Result>
1.490 -inline constant_unary_fun<_Result,_Result> constant1(const _Result& __val)
1.491 -{
1.492 +inline constant_unary_fun<_Result,_Result> constant1(const _Result& __val) {
1.493 return constant_unary_fun<_Result,_Result>(__val);
1.494 }
1.495
1.496 template <class _Result>
1.497 -inline constant_binary_fun<_Result,_Result,_Result>
1.498 -constant2(const _Result& __val)
1.499 -{
1.500 +inline constant_binary_fun<_Result,_Result,_Result>
1.501 +constant2(const _Result& __val) {
1.502 return constant_binary_fun<_Result,_Result,_Result>(__val);
1.503 }
1.504
1.505 @@ -335,8 +392,7 @@
1.506 return _M_table[_M_index1] % __limit;
1.507 }
1.508
1.509 - void _M_initialize(_STLP_UINT32_T __seed)
1.510 - {
1.511 + void _M_initialize(_STLP_UINT32_T __seed) {
1.512 _STLP_UINT32_T __k = 1;
1.513 _M_table[54] = __seed;
1.514 _STLP_UINT32_T __i;
1.515 @@ -358,7 +414,7 @@
1.516 subtractive_rng() { _M_initialize(161803398ul); }
1.517 };
1.518
1.519 -# endif /* _STLP_NO_EXTENSIONS */
1.520 +#endif /* _STLP_NO_EXTENSIONS */
1.521
1.522 _STLP_END_NAMESPACE
1.523