EPICS Base
7.0.6.1
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
tsMinMax.h
1
/*************************************************************************\
2
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
3
* National Laboratory.
4
* Copyright (c) 2002 The Regents of the University of California, as
5
* Operator of Los Alamos National Laboratory.
6
* SPDX-License-Identifier: EPICS
7
* EPICS Base is distributed subject to a Software License Agreement found
8
* in file LICENSE that is included with this distribution.
9
\*************************************************************************/
10
11
//
12
// simple type safe inline template functions to replace
13
// the min() and max() macros
14
//
15
16
#ifndef tsMinMaxh
17
#define tsMinMaxh
18
19
template
<
class
T>
20
inline
const
T & tsMax (
const
T & a,
const
T & b )
21
{
22
return
( a > b ) ? a : b;
23
}
24
25
template
<
class
T>
26
inline
const
T & tsMin (
const
T & a,
const
T & b )
27
{
28
return
( a < b ) ? a : b;
29
}
30
31
#endif // tsMinMaxh
Generated on Wed Oct 6 2021 20:58:14 for EPICS Base by
1.8.5