ReactOS
0.4.16-dev-755-g88f105e
unary.h
Go to the documentation of this file.
1
#ifndef _unary_h
2
#define _unary_h
3
#include <cmath>
4
#include <cfloat>
5
#include <functional>
//*TY 12/26/1998 - added to get unary_function
6
7
#if !defined (STLPORT) || defined (_STLP_USE_NAMESPACES)
8
using
std::unary_function;
9
#endif
10
11
struct
odd
:
public
unary_function
<int, bool> {
12
bool
operator()
(
int
n_)
const
{
return
(n_ % 2) == 1; }
13
};
14
15
struct
positive
:
public
unary_function
<int, bool> {
16
bool
operator()
(
int
n_)
const
{
return
n_ >= 0; }
17
};
18
19
struct
square_root
:
public
unary_function
<double, double> {
20
double
operator()
(
double
x_)
const
21
{ return ::sqrt(x_); }
22
};
23
#endif
// _unary_h
odd
Definition:
unary.h:11
odd::operator()
bool operator()(int n_) const
Definition:
unary.h:12
positive
Definition:
unary.h:15
positive::operator()
bool operator()(int n_) const
Definition:
unary.h:16
square_root
Definition:
unary.h:19
square_root::operator()
double operator()(double x_) const
Definition:
unary.h:20
unary_function
Definition:
_function_base.h:40
sdk
lib
3rdparty
stlport
test
unit
unary.h
Generated on Wed Feb 19 2025 06:14:21 for ReactOS by
1.9.6