A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to be zero at compile-time. It is also used for tagged dispatch.
More...
|
static zero | dummy |
| A static instance, when modifiable reference is required by an API. More...
|
|
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to be zero at compile-time. It is also used for tagged dispatch.
- Source files
-
- See also
- Foam::one
Definition at line 57 of file zero.H.
◆ value_type
The value type.
Definition at line 64 of file zero.H.
◆ zero() [1/2]
Default construct.
Definition at line 74 of file zero.H.
◆ zero() [2/2]
Construct from Istream consumes no content.
Definition at line 79 of file zero.H.
◆ operator bool()
constexpr operator bool |
( |
| ) |
const |
|
inlinenoexcept |
Return false (0) for bool.
Definition at line 85 of file zero.H.
◆ operator label()
constexpr operator label |
( |
| ) |
const |
|
inlinenoexcept |
Return 0 for label.
Definition at line 90 of file zero.H.
◆ operator float()
constexpr operator float |
( |
| ) |
const |
|
inlinenoexcept |
Return 0 for float.
Definition at line 95 of file zero.H.
◆ operator double()
constexpr operator double |
( |
| ) |
const |
|
inlinenoexcept |
Return 0 for double.
Definition at line 100 of file zero.H.
◆ operator[]()
zero operator[] |
( |
const label |
| ) |
const |
|
inlinenoexcept |
Component-wise or element-wise access returns zero.
Definition at line 105 of file zero.H.
◆ operator()()
constexpr zero operator() |
( |
const T & |
| ) |
const |
|
inlinenoexcept |
Unary functor returns zero.
Definition at line 115 of file zero.H.
◆ dummy
The documentation for this class was generated from the following files:
- src/OpenFOAM/primitives/traits/zero.H
- src/OpenFOAM/primitives/traits/zero.C