File validation.hpp¶
Functions
-
template<typename T>
static inline constexpr void assertGreater(const std::string &name, const T value, const T threshold)¶ Throws a
std::invalid_argument
exception if a given value is not greater than a specific threshold.- Template Parameters:
T – The type of the value and threshold
- Parameters:
name – The name of the parameter, the value corresponds to
value – The value
threshold – The threshold
-
template<typename T>
static inline constexpr void assertGreaterOrEqual(const std::string &name, const T value, const T threshold)¶ Throws a
std::invalid_argument
exception if a given value not greater or equal to a specific threshold.- Template Parameters:
T – The type of the value and threshold
- Parameters:
name – The name of the parameter, the value corresponds to
value – The value
threshold – The threshold
-
template<typename T>
static inline constexpr void assertLess(const std::string &name, const T value, const T threshold)¶ Throws a
std::invalid_argument
exception if a given value is not less than a specific threshold.- Template Parameters:
T – The type of the value and threshold
- Parameters:
name – The name of the parameter, the value corresponds to
value – The value
threshold – The threshold
-
template<typename T>
static inline constexpr void assertLessOrEqual(const std::string &name, const T value, const T threshold)¶ Throws a
std::invalid_argument
exception if a given value is not less or equal to a specific threshold.- Template Parameters:
T – The type of the value and threshold
- Parameters:
name – The name of the parameter, the value corresponds to
value – The value
threshold – The threshold
-
template<typename T>
static inline constexpr void assertMultiple(const std::string &name, const T value, const T other)¶ Throws a
std::invalid_argument
exception if a given value is not a multiple of another value.- Template Parameters:
T – The type of the values
- Parameters:
name – The name of the parameter, the value corresponds to
value – The value that should be a multiple of
other
other – The other value