42 static_assert(!std::is_same_v<T, bool>,
"Do not use invalid<bool>() !");
43 static_assert(std::is_arithmetic_v<T>,
"invalid<T> is only supported for arithmetic types");
44 if constexpr (std::numeric_limits<T>::has_infinity) {
45 return std::numeric_limits<T>::infinity();
47 return std::numeric_limits<T>::max();
constexpr T invalid()
You can use invalid<T>() to get a value that can represent "invalid" values, such as invalid indices ...
Definition: invalid.h:40
Main namespace for Lagrange.
Definition: AABBIGL.h:30