Sanity-check functions etc.
More...
Go to the source code of this file.
|
| void | throwIfNotPresent (const bool is_present, const std::string val_desc) |
| | Throws an exception if the given value is not present. More...
|
| |
| template<typename T1 , typename T2 > |
| void | throwIfOutOfRange (const T1 &val, const T2 &min, const T2 &max, const std::string val_desc) |
| | Throws an exception if a given value is out of a defined range. More...
|
| |
Sanity-check functions etc.
Definition in file checks.h.
◆ throwIfNotPresent()
| void throwIfNotPresent |
( |
const bool |
is_present, |
|
|
const std::string |
val_desc |
|
) |
| |
|
inline |
Throws an exception if the given value is not present.
- Parameters
-
| is_present | Whether the value is present. |
| val_desc | Description of the value for the exception message. |
Definition at line 57 of file checks.h.
◆ throwIfOutOfRange()
template<typename T1 , typename T2 >
| void throwIfOutOfRange |
( |
const T1 & |
val, |
|
|
const T2 & |
min, |
|
|
const T2 & |
max, |
|
|
const std::string |
val_desc |
|
) |
| |
Throws an exception if a given value is out of a defined range.
- Template Parameters
-
- Parameters
-
| val | The value to check if it is in the range. |
| min | The minimum value of the range. |
| max | The maximum value of the range. |
| val_desc | Description of the value for the exception message. |
Definition at line 46 of file checks.h.