Helper structure used to (conditionnaly) validate indices. More...
Public Member Functions | |
template<> | |
constexpr IndexT | validate (const IndexT &n, const SizeT &gsize) |
template<> | |
constexpr IndexT | validate (const IndexT &n, const SizeT &) |
Static Public Member Functions | |
template<class IndexT , class SizeT > | |
static constexpr IndexT | validate (const IndexT &n, const SizeT &gsize) |
Check if n is within [0:gsize] if enable=true. More... | |
template<class IndexT , class SizeT > | |
static constexpr bool | _test (const IndexT &n, const SizeT &gsize) |
Test used internally to validate the input index. More... | |
Helper structure used to (conditionnaly) validate indices.
The template parameter enable allows to control the validation, without overload when the validation is disabled.
Throw std::out_of_range exception when the validation is enabled and an invalid case is detected
|
inlinestatic |
Test used internally to validate the input index.
|
inlinestatic |
Check if n is within [0:gsize] if enable=true.
std::out_of_range |
constexpr IndexT GlobalRegistration::Utils::internal::IndexValidator< true >::validate | ( | const IndexT & | n, |
const SizeT & | gsize | ||
) |
constexpr IndexT GlobalRegistration::Utils::internal::IndexValidator< false >::validate | ( | const IndexT & | n, |
const SizeT & | |||
) |