This is #1184 but for modulo... sounds like it was forgotten that you can not mod by zero either.
There is also a case of division and modulo of std::numeric_limits<T>::min() / -1 which is UB aswell. Not sure if you want to check it too - it requires to check both operands.