epoc32/include/tools/stlport/stl/_function.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@4
     1
/*
williamr@4
     2
 *
williamr@4
     3
 * Copyright (c) 1994
williamr@4
     4
 * Hewlett-Packard Company
williamr@4
     5
 *
williamr@4
     6
 * Copyright (c) 1996-1998
williamr@4
     7
 * Silicon Graphics Computer Systems, Inc.
williamr@4
     8
 *
williamr@4
     9
 * Copyright (c) 1997
williamr@4
    10
 * Moscow Center for SPARC Technology
williamr@4
    11
 *
williamr@4
    12
 * Copyright (c) 1999
williamr@4
    13
 * Boris Fomitchev
williamr@4
    14
 *
williamr@4
    15
 * This material is provided "as is", with absolutely no warranty expressed
williamr@4
    16
 * or implied. Any use is at your own risk.
williamr@4
    17
 *
williamr@4
    18
 * Permission to use or copy this software for any purpose is hereby granted
williamr@4
    19
 * without fee, provided the above notices are retained on all copies.
williamr@4
    20
 * Permission to modify the code and to distribute modified code is granted,
williamr@4
    21
 * provided the above notices are retained, and a notice that the code was
williamr@4
    22
 * modified is included with the above copyright notice.
williamr@4
    23
 *
williamr@4
    24
 */
williamr@4
    25
williamr@4
    26
/* NOTE: This is an internal header file, included by other STL headers.
williamr@4
    27
 *   You should not attempt to use it directly.
williamr@4
    28
 */
williamr@4
    29
williamr@4
    30
#ifndef _STLP_INTERNAL_FUNCTION_H
williamr@4
    31
#define _STLP_INTERNAL_FUNCTION_H
williamr@4
    32
williamr@4
    33
#ifndef _STLP_TYPE_TRAITS_H
williamr@4
    34
#  include <stl/type_traits.h>
williamr@4
    35
#endif
williamr@4
    36
williamr@4
    37
#ifndef _STLP_INTERNAL_FUNCTION_BASE_H
williamr@4
    38
#  include <stl/_function_base.h>
williamr@4
    39
#endif
williamr@4
    40
williamr@4
    41
_STLP_BEGIN_NAMESPACE
williamr@4
    42
williamr@4
    43
template <class _Tp>
williamr@4
    44
struct not_equal_to : public binary_function<_Tp, _Tp, bool> {
williamr@4
    45
  bool operator()(const _Tp& __x, const _Tp& __y) const { return __x != __y; }
williamr@4
    46
};
williamr@4
    47
williamr@4
    48
template <class _Tp>
williamr@4
    49
struct greater : public binary_function<_Tp, _Tp, bool> {
williamr@4
    50
  bool operator()(const _Tp& __x, const _Tp& __y) const { return __x > __y; }
williamr@4
    51
};
williamr@4
    52
williamr@4
    53
template <class _Tp>
williamr@4
    54
struct greater_equal : public binary_function<_Tp, _Tp, bool> {
williamr@4
    55
  bool operator()(const _Tp& __x, const _Tp& __y) const { return __x >= __y; }
williamr@4
    56
};
williamr@4
    57
williamr@4
    58
template <class _Tp>
williamr@4
    59
struct less_equal : public binary_function<_Tp, _Tp, bool> {
williamr@4
    60
  bool operator()(const _Tp& __x, const _Tp& __y) const { return __x <= __y; }
williamr@4
    61
};
williamr@4
    62
williamr@4
    63
template <class _Tp>
williamr@4
    64
struct divides : public binary_function<_Tp, _Tp, _Tp> {
williamr@4
    65
  _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x / __y; }
williamr@4
    66
};
williamr@4
    67
williamr@4
    68
template <class _Tp>
williamr@4
    69
struct modulus : public binary_function<_Tp, _Tp, _Tp> {
williamr@4
    70
  _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x % __y; }
williamr@4
    71
};
williamr@4
    72
williamr@4
    73
template <class _Tp>
williamr@4
    74
struct negate : public unary_function<_Tp, _Tp> {
williamr@4
    75
  _Tp operator()(const _Tp& __x) const { return -__x; }
williamr@4
    76
};
williamr@4
    77
williamr@4
    78
template <class _Tp>
williamr@4
    79
struct logical_and : public binary_function<_Tp, _Tp, bool> {
williamr@4
    80
  bool operator()(const _Tp& __x, const _Tp& __y) const { return __x && __y; }
williamr@4
    81
};
williamr@4
    82
williamr@4
    83
template <class _Tp>
williamr@4
    84
struct logical_or : public binary_function<_Tp, _Tp,bool> {
williamr@4
    85
  bool operator()(const _Tp& __x, const _Tp& __y) const { return __x || __y; }
williamr@4
    86
};
williamr@4
    87
williamr@4
    88
template <class _Tp>
williamr@4
    89
struct logical_not : public unary_function<_Tp, bool> {
williamr@4
    90
  bool operator()(const _Tp& __x) const { return !__x; }
williamr@4
    91
};
williamr@4
    92
williamr@4
    93
#if !defined (_STLP_NO_EXTENSIONS)
williamr@4
    94
// identity_element (not part of the C++ standard).
williamr@4
    95
template <class _Tp> inline _Tp identity_element(plus<_Tp>) {  return _Tp(0); }
williamr@4
    96
template <class _Tp> inline _Tp identity_element(multiplies<_Tp>) { return _Tp(1); }
williamr@4
    97
#endif
williamr@4
    98
williamr@4
    99
#if defined (_STLP_BASE_TYPEDEF_BUG)
williamr@4
   100
// this workaround is needed for SunPro 4.0.1
williamr@4
   101
// suggested by "Martin Abernethy" <gma@paston.co.uk>:
williamr@4
   102
williamr@4
   103
// We have to introduce the XXary_predicate_aux structures in order to
williamr@4
   104
// access the argument and return types of predicate functions supplied
williamr@4
   105
// as type parameters. SUN C++ 4.0.1 compiler gives errors for template type parameters
williamr@4
   106
// of the form 'name1::name2', where name1 is itself a type parameter.
williamr@4
   107
template <class _Pair>
williamr@4
   108
struct __pair_aux : private _Pair {
williamr@4
   109
  typedef typename _Pair::first_type first_type;
williamr@4
   110
  typedef typename _Pair::second_type second_type;
williamr@4
   111
};
williamr@4
   112
williamr@4
   113
template <class _Operation>
williamr@4
   114
struct __unary_fun_aux : private _Operation {
williamr@4
   115
  typedef typename _Operation::argument_type argument_type;
williamr@4
   116
  typedef typename _Operation::result_type result_type;
williamr@4
   117
};
williamr@4
   118
williamr@4
   119
template <class _Operation>
williamr@4
   120
struct __binary_fun_aux  : private _Operation {
williamr@4
   121
  typedef typename _Operation::first_argument_type first_argument_type;
williamr@4
   122
  typedef typename _Operation::second_argument_type second_argument_type;
williamr@4
   123
  typedef typename _Operation::result_type result_type;
williamr@4
   124
};
williamr@4
   125
williamr@4
   126
#  define __UNARY_ARG(__Operation,__type)  __unary_fun_aux<__Operation>::__type
williamr@4
   127
#  define __BINARY_ARG(__Operation,__type)  __binary_fun_aux<__Operation>::__type
williamr@4
   128
#  define __PAIR_ARG(__Pair,__type)  __pair_aux<__Pair>::__type
williamr@4
   129
#else
williamr@4
   130
#  define __UNARY_ARG(__Operation,__type)  __Operation::__type
williamr@4
   131
#  define __BINARY_ARG(__Operation,__type) __Operation::__type
williamr@4
   132
#  define __PAIR_ARG(__Pair,__type) __Pair::__type
williamr@4
   133
#endif
williamr@4
   134
williamr@4
   135
template <class _Predicate>
williamr@4
   136
class unary_negate
williamr@4
   137
    : public unary_function<typename __UNARY_ARG(_Predicate, argument_type), bool> {
williamr@4
   138
  typedef unary_function<typename __UNARY_ARG(_Predicate, argument_type), bool> _Base;
williamr@4
   139
public:
williamr@4
   140
  typedef typename _Base::argument_type argument_type;
williamr@4
   141
private:
williamr@4
   142
  typedef typename __call_traits<argument_type>::param_type _ArgParamType;
williamr@4
   143
protected:
williamr@4
   144
  _Predicate _M_pred;
williamr@4
   145
public:
williamr@4
   146
  explicit unary_negate(const _Predicate& __x) : _M_pred(__x) {}
williamr@4
   147
  bool operator()(_ArgParamType __x) const {
williamr@4
   148
    return !_M_pred(__x);
williamr@4
   149
  }
williamr@4
   150
};
williamr@4
   151
williamr@4
   152
template <class _Predicate>
williamr@4
   153
inline unary_negate<_Predicate>
williamr@4
   154
not1(const _Predicate& __pred) {
williamr@4
   155
  return unary_negate<_Predicate>(__pred);
williamr@4
   156
}
williamr@4
   157
williamr@4
   158
template <class _Predicate>
williamr@4
   159
class binary_negate
williamr@4
   160
    : public binary_function<typename __BINARY_ARG(_Predicate, first_argument_type),
williamr@4
   161
                             typename __BINARY_ARG(_Predicate, second_argument_type),
williamr@4
   162
                             bool> {
williamr@4
   163
  typedef binary_function<typename __BINARY_ARG(_Predicate, first_argument_type),
williamr@4
   164
                          typename __BINARY_ARG(_Predicate, second_argument_type),
williamr@4
   165
                          bool> _Base;
williamr@4
   166
public:
williamr@4
   167
  typedef typename _Base::first_argument_type first_argument_type;
williamr@4
   168
  typedef typename _Base::second_argument_type second_argument_type;
williamr@4
   169
private:
williamr@4
   170
  typedef typename __call_traits<first_argument_type>::param_type _FstArgParamType;
williamr@4
   171
  typedef typename __call_traits<second_argument_type>::param_type _SndArgParamType;
williamr@4
   172
protected:
williamr@4
   173
  _Predicate _M_pred;
williamr@4
   174
public:
williamr@4
   175
  explicit binary_negate(const _Predicate& __x) : _M_pred(__x) {}
williamr@4
   176
  bool operator()(_FstArgParamType __x, _SndArgParamType __y) const {
williamr@4
   177
    return !_M_pred(__x, __y);
williamr@4
   178
  }
williamr@4
   179
};
williamr@4
   180
williamr@4
   181
template <class _Predicate>
williamr@4
   182
inline binary_negate<_Predicate>
williamr@4
   183
not2(const _Predicate& __pred) {
williamr@4
   184
  return binary_negate<_Predicate>(__pred);
williamr@4
   185
}
williamr@4
   186
williamr@4
   187
template <class _Operation>
williamr@4
   188
class binder1st :
williamr@4
   189
    public unary_function<typename __BINARY_ARG(_Operation, second_argument_type),
williamr@4
   190
                          typename __BINARY_ARG(_Operation, result_type) > {
williamr@4
   191
  typedef unary_function<typename __BINARY_ARG(_Operation, second_argument_type),
williamr@4
   192
                         typename __BINARY_ARG(_Operation, result_type) > _Base;
williamr@4
   193
public:
williamr@4
   194
  typedef typename _Base::argument_type argument_type;
williamr@4
   195
  typedef typename _Base::result_type result_type;
williamr@4
   196
private:
williamr@4
   197
  typedef typename __call_traits<argument_type>::param_type _ArgParamType;
williamr@4
   198
  typedef typename __call_traits<typename _Operation::first_argument_type>::param_type _ValueParamType;
williamr@4
   199
protected:
williamr@4
   200
  //op is a Standard name (20.3.6.1), do no make it STLport naming convention compliant.
williamr@4
   201
  _Operation op;
williamr@4
   202
  typename _Operation::first_argument_type _M_value;
williamr@4
   203
public:
williamr@4
   204
  binder1st(const _Operation& __x, _ValueParamType __y)
williamr@4
   205
      : op(__x), _M_value(__y) {}
williamr@4
   206
williamr@4
   207
  result_type operator()(_ArgParamType __x) const {
williamr@4
   208
    return op(_M_value, __x);
williamr@4
   209
  }
williamr@4
   210
};
williamr@4
   211
williamr@4
   212
template <class _Operation, class _Tp>
williamr@4
   213
inline binder1st<_Operation>
williamr@4
   214
bind1st(const _Operation& __fn, const _Tp& __x) {
williamr@4
   215
  typedef typename _Operation::first_argument_type _Arg1_type;
williamr@4
   216
  return binder1st<_Operation>(__fn, _Arg1_type(__x));
williamr@4
   217
}
williamr@4
   218
williamr@4
   219
template <class _Operation>
williamr@4
   220
class binder2nd
williamr@4
   221
  : public unary_function<typename __BINARY_ARG(_Operation, first_argument_type),
williamr@4
   222
                          typename __BINARY_ARG(_Operation, result_type)> {
williamr@4
   223
  typedef unary_function<typename __BINARY_ARG(_Operation, first_argument_type),
williamr@4
   224
                         typename __BINARY_ARG(_Operation, result_type)> _Base;
williamr@4
   225
public:
williamr@4
   226
  typedef typename _Base::argument_type argument_type;
williamr@4
   227
  typedef typename _Base::result_type result_type;
williamr@4
   228
private:
williamr@4
   229
  typedef typename __call_traits<argument_type>::param_type _ArgParamType;
williamr@4
   230
  typedef typename __call_traits<typename _Operation::second_argument_type>::param_type _ValueParamType;
williamr@4
   231
protected:
williamr@4
   232
  //op is a Standard name (20.3.6.3), do no make it STLport naming convention compliant.
williamr@4
   233
  _Operation op;
williamr@4
   234
  typename _Operation::second_argument_type value;
williamr@4
   235
public:
williamr@4
   236
  binder2nd(const _Operation& __x, _ValueParamType __y)
williamr@4
   237
      : op(__x), value(__y) {}
williamr@4
   238
williamr@4
   239
  result_type operator()(_ArgParamType __x) const {
williamr@4
   240
    return op(__x, value);
williamr@4
   241
  }
williamr@4
   242
};
williamr@4
   243
williamr@4
   244
template <class _Operation, class _Tp>
williamr@4
   245
inline binder2nd<_Operation>
williamr@4
   246
bind2nd(const _Operation& __fn, const _Tp& __x) {
williamr@4
   247
  typedef typename _Operation::second_argument_type _Arg2_type;
williamr@4
   248
  return binder2nd<_Operation>(__fn, _Arg2_type(__x));
williamr@4
   249
}
williamr@4
   250
williamr@4
   251
#if !defined (_STLP_NO_EXTENSIONS)
williamr@4
   252
// unary_compose and binary_compose (extensions, not part of the standard).
williamr@4
   253
williamr@4
   254
template <class _Operation1, class _Operation2>
williamr@4
   255
class unary_compose :
williamr@4
   256
  public unary_function<typename __UNARY_ARG(_Operation2, argument_type),
williamr@4
   257
                        typename __UNARY_ARG(_Operation1, result_type)> {
williamr@4
   258
  typedef unary_function<typename __UNARY_ARG(_Operation2, argument_type),
williamr@4
   259
                         typename __UNARY_ARG(_Operation1, result_type)> _Base;
williamr@4
   260
public:
williamr@4
   261
  typedef typename _Base::argument_type argument_type;
williamr@4
   262
  typedef typename _Base::result_type result_type;
williamr@4
   263
private:
williamr@4
   264
  typedef typename __call_traits<argument_type>::param_type _ArgParamType;
williamr@4
   265
protected:
williamr@4
   266
  _Operation1 _M_fn1;
williamr@4
   267
  _Operation2 _M_fn2;
williamr@4
   268
public:
williamr@4
   269
  unary_compose(const _Operation1& __x, const _Operation2& __y)
williamr@4
   270
    : _M_fn1(__x), _M_fn2(__y) {}
williamr@4
   271
williamr@4
   272
  result_type operator()(_ArgParamType __x) const {
williamr@4
   273
    return _M_fn1(_M_fn2(__x));
williamr@4
   274
  }
williamr@4
   275
};
williamr@4
   276
williamr@4
   277
template <class _Operation1, class _Operation2>
williamr@4
   278
inline unary_compose<_Operation1,_Operation2>
williamr@4
   279
compose1(const _Operation1& __fn1, const _Operation2& __fn2) {
williamr@4
   280
  return unary_compose<_Operation1,_Operation2>(__fn1, __fn2);
williamr@4
   281
}
williamr@4
   282
williamr@4
   283
template <class _Operation1, class _Operation2, class _Operation3>
williamr@4
   284
class binary_compose :
williamr@4
   285
    public unary_function<typename __UNARY_ARG(_Operation2, argument_type),
williamr@4
   286
                          typename __BINARY_ARG(_Operation1, result_type)> {
williamr@4
   287
  typedef unary_function<typename __UNARY_ARG(_Operation2, argument_type),
williamr@4
   288
                         typename __BINARY_ARG(_Operation1, result_type)> _Base;
williamr@4
   289
public:
williamr@4
   290
  typedef typename _Base::argument_type argument_type;
williamr@4
   291
  typedef typename _Base::result_type result_type;
williamr@4
   292
private:
williamr@4
   293
  typedef typename __call_traits<argument_type>::param_type _ArgParamType;
williamr@4
   294
protected:
williamr@4
   295
  _Operation1 _M_fn1;
williamr@4
   296
  _Operation2 _M_fn2;
williamr@4
   297
  _Operation3 _M_fn3;
williamr@4
   298
public:
williamr@4
   299
  binary_compose(const _Operation1& __x, const _Operation2& __y,
williamr@4
   300
                 const _Operation3& __z)
williamr@4
   301
    : _M_fn1(__x), _M_fn2(__y), _M_fn3(__z) { }
williamr@4
   302
williamr@4
   303
  result_type operator()(_ArgParamType __x) const {
williamr@4
   304
    return _M_fn1(_M_fn2(__x), _M_fn3(__x));
williamr@4
   305
  }
williamr@4
   306
};
williamr@4
   307
williamr@4
   308
template <class _Operation1, class _Operation2, class _Operation3>
williamr@4
   309
inline binary_compose<_Operation1, _Operation2, _Operation3>
williamr@4
   310
compose2(const _Operation1& __fn1, const _Operation2& __fn2,
williamr@4
   311
         const _Operation3& __fn3) {
williamr@4
   312
  return binary_compose<_Operation1,_Operation2,_Operation3>(__fn1, __fn2, __fn3);
williamr@4
   313
}
williamr@4
   314
williamr@4
   315
// identity is an extension: it is not part of the standard.
williamr@4
   316
template <class _Tp> struct identity : public _STLP_PRIV _Identity<_Tp> {};
williamr@4
   317
// select1st and select2nd are extensions: they are not part of the standard.
williamr@4
   318
template <class _Pair> struct select1st : public _STLP_PRIV _Select1st<_Pair> {};
williamr@4
   319
template <class _Pair> struct select2nd : public _STLP_PRIV _Select2nd<_Pair> {};
williamr@4
   320
williamr@4
   321
template <class _Arg1, class _Arg2>
williamr@4
   322
struct project1st : public _STLP_PRIV _Project1st<_Arg1, _Arg2> {};
williamr@4
   323
williamr@4
   324
template <class _Arg1, class _Arg2>
williamr@4
   325
struct project2nd : public _STLP_PRIV _Project2nd<_Arg1, _Arg2> {};
williamr@4
   326
williamr@4
   327
williamr@4
   328
// constant_void_fun, constant_unary_fun, and constant_binary_fun are
williamr@4
   329
// extensions: they are not part of the standard.  (The same, of course,
williamr@4
   330
// is true of the helper functions constant0, constant1, and constant2.)
williamr@4
   331
williamr@4
   332
_STLP_MOVE_TO_PRIV_NAMESPACE
williamr@4
   333
williamr@4
   334
template <class _Result>
williamr@4
   335
struct _Constant_void_fun {
williamr@4
   336
  typedef _Result result_type;
williamr@4
   337
  result_type _M_val;
williamr@4
   338
williamr@4
   339
  _Constant_void_fun(const result_type& __v) : _M_val(__v) {}
williamr@4
   340
  const result_type& operator()() const { return _M_val; }
williamr@4
   341
};
williamr@4
   342
williamr@4
   343
_STLP_MOVE_TO_STD_NAMESPACE
williamr@4
   344
williamr@4
   345
template <class _Result>
williamr@4
   346
struct constant_void_fun : public _STLP_PRIV _Constant_void_fun<_Result> {
williamr@4
   347
  constant_void_fun(const _Result& __v)
williamr@4
   348
    : _STLP_PRIV _Constant_void_fun<_Result>(__v) {}
williamr@4
   349
};
williamr@4
   350
williamr@4
   351
template <class _Result, _STLP_DFL_TMPL_PARAM( _Argument , _Result) >
williamr@4
   352
struct constant_unary_fun : public _STLP_PRIV _Constant_unary_fun<_Result, _Argument> {
williamr@4
   353
  constant_unary_fun(const _Result& __v)
williamr@4
   354
    : _STLP_PRIV _Constant_unary_fun<_Result, _Argument>(__v) {}
williamr@4
   355
};
williamr@4
   356
williamr@4
   357
template <class _Result, _STLP_DFL_TMPL_PARAM( _Arg1 , _Result), _STLP_DFL_TMPL_PARAM( _Arg2 , _Arg1) >
williamr@4
   358
struct constant_binary_fun
williamr@4
   359
  : public _STLP_PRIV _Constant_binary_fun<_Result, _Arg1, _Arg2> {
williamr@4
   360
  constant_binary_fun(const _Result& __v)
williamr@4
   361
    : _STLP_PRIV _Constant_binary_fun<_Result, _Arg1, _Arg2>(__v) {}
williamr@4
   362
};
williamr@4
   363
williamr@4
   364
template <class _Result>
williamr@4
   365
inline constant_void_fun<_Result> constant0(const _Result& __val) {
williamr@4
   366
  return constant_void_fun<_Result>(__val);
williamr@4
   367
}
williamr@4
   368
williamr@4
   369
template <class _Result>
williamr@4
   370
inline constant_unary_fun<_Result,_Result> constant1(const _Result& __val) {
williamr@4
   371
  return constant_unary_fun<_Result,_Result>(__val);
williamr@4
   372
}
williamr@4
   373
williamr@4
   374
template <class _Result>
williamr@4
   375
inline constant_binary_fun<_Result,_Result,_Result>
williamr@4
   376
constant2(const _Result& __val) {
williamr@4
   377
  return constant_binary_fun<_Result,_Result,_Result>(__val);
williamr@4
   378
}
williamr@4
   379
williamr@4
   380
// subtractive_rng is an extension: it is not part of the standard.
williamr@4
   381
// Note: this code assumes that int is 32 bits.
williamr@4
   382
class subtractive_rng : public unary_function<_STLP_UINT32_T, _STLP_UINT32_T> {
williamr@4
   383
private:
williamr@4
   384
  _STLP_UINT32_T _M_table[55];
williamr@4
   385
  _STLP_UINT32_T _M_index1;
williamr@4
   386
  _STLP_UINT32_T _M_index2;
williamr@4
   387
public:
williamr@4
   388
  _STLP_UINT32_T operator()(_STLP_UINT32_T __limit) {
williamr@4
   389
    _M_index1 = (_M_index1 + 1) % 55;
williamr@4
   390
    _M_index2 = (_M_index2 + 1) % 55;
williamr@4
   391
    _M_table[_M_index1] = _M_table[_M_index1] - _M_table[_M_index2];
williamr@4
   392
    return _M_table[_M_index1] % __limit;
williamr@4
   393
  }
williamr@4
   394
williamr@4
   395
  void _M_initialize(_STLP_UINT32_T __seed) {
williamr@4
   396
    _STLP_UINT32_T __k = 1;
williamr@4
   397
    _M_table[54] = __seed;
williamr@4
   398
    _STLP_UINT32_T __i;
williamr@4
   399
    for (__i = 0; __i < 54; __i++) {
williamr@4
   400
        _STLP_UINT32_T __ii = (21 * (__i + 1) % 55) - 1;
williamr@4
   401
        _M_table[__ii] = __k;
williamr@4
   402
        __k = __seed - __k;
williamr@4
   403
        __seed = _M_table[__ii];
williamr@4
   404
    }
williamr@4
   405
    for (int __loop = 0; __loop < 4; __loop++) {
williamr@4
   406
        for (__i = 0; __i < 55; __i++)
williamr@4
   407
            _M_table[__i] = _M_table[__i] - _M_table[(1 + __i + 30) % 55];
williamr@4
   408
    }
williamr@4
   409
    _M_index1 = 0;
williamr@4
   410
    _M_index2 = 31;
williamr@4
   411
  }
williamr@4
   412
williamr@4
   413
  subtractive_rng(unsigned int __seed) { _M_initialize(__seed); }
williamr@4
   414
  subtractive_rng() { _M_initialize(161803398ul); }
williamr@4
   415
};
williamr@4
   416
williamr@4
   417
#endif /* _STLP_NO_EXTENSIONS */
williamr@4
   418
williamr@4
   419
_STLP_END_NAMESPACE
williamr@4
   420
williamr@4
   421
#include <stl/_function_adaptors.h>
williamr@4
   422
williamr@4
   423
#endif /* _STLP_INTERNAL_FUNCTION_H */
williamr@4
   424
williamr@4
   425
// Local Variables:
williamr@4
   426
// mode:C++
williamr@4
   427
// End: