A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to be one at compile-time. It is also used for tagged dispatch.
More...
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to be one at compile-time. It is also used for tagged dispatch.
- Source files
-
- See also
- Foam::zero
Definition at line 57 of file one.H.
◆ value_type
Definition at line 61 of file one.H.
◆ one() [1/2]
Default construct.
Definition at line 70 of file one.H.
◆ one() [2/2]
Construct from Istream consumes no content.
Definition at line 75 of file one.H.
◆ operator label()
constexpr operator label |
( |
| ) |
const |
|
inlinenoexcept |
Return 1 for label.
Definition at line 81 of file one.H.
◆ operator float()
constexpr operator float |
( |
| ) |
const |
|
inlinenoexcept |
Return 1 for float.
Definition at line 89 of file one.H.
◆ operator double()
constexpr operator double |
( |
| ) |
const |
|
inlinenoexcept |
Return 1 for double.
Definition at line 97 of file one.H.
◆ operator[]()
one operator[] |
( |
const label |
| ) |
const |
|
inlinenoexcept |
Component-wise or element-wise access returns one.
Definition at line 105 of file one.H.
The documentation for this class was generated from the following file:
- src/OpenFOAM/primitives/one/one.H