36template <base::concepts::
integral T>
39 if (a !=
static_cast<T
>(0) && res / a != b) {
Class of exception on failure in algorithm.
Definition of exceptions.
Definition of integral concept.
Definition of macros for logging.
#define NUM_COLLECT_LOG_AND_THROW(EXCEPTION_TYPE,...)
Write an error log and throw an exception for an error.
constexpr auto multiply_safely(T a, T b) -> T
Multiply two integers with check of overflow.