Itasca C++ Interface
Main Page
Modules
+
Namespaces
Namespace List
+
Namespace Members
All
Functions
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
a
c
d
e
g
i
m
n
o
p
r
s
t
v
w
+
Typedefs
c
d
f
i
l
n
p
s
t
u
v
Enumerations
+
Enumerator
a
b
c
d
f
g
h
i
k
l
n
p
r
s
u
v
Related Functions
+
Files
File List
+
File Members
+
All
_
a
b
c
d
f
g
i
l
o
q
r
s
t
u
v
+
Functions
c
d
g
i
o
r
s
t
Typedefs
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Modules
Pages
common
base
src
limit.h
Go to the documentation of this file.
1
#pragma once
2
7
#include "
basedef.h
"
8
#include <limits>
9
10
#ifdef _WIN32
11
# pragma warning(disable:4146)
12
#endif
13
14
#ifdef __LINUX
15
#include <math.h>
16
#endif
17
24
template
<
class
T>
25
class
limits
:
public
std::numeric_limits<T> {
26
public
:
31
static
T
real_min
() {
32
T min_val =
limits<T>::is_integer
? (
limits<T>::is_signed
?
limits<T>::min
() : 0) : -
limits<T>::max
();
33
return
min_val;
34
}
35
};
36
template
<
class
T>
37
constexpr T initVal() {
return
limits<T>::max
(); }
38
template
<>
39
constexpr
double
initVal<double>() {
return
limits<double>::quiet_NaN
(); }
40
template
<>
41
constexpr
float
initVal<float>() {
return
limits<float>::quiet_NaN
(); }
42
43
44
#ifdef _WIN32
45
# pragma warning(default:4146)
46
#endif
47
49
// EoF
limits::real_min
static T real_min()
Definition:
limit.h:31
limits
debug checked shorthand for std::numeric_limits<T>::
Definition:
limit.h:25
basedef.h
Base type definitions - if QT is not in use.
Generated by
1.8.15