23 template<i32 power,
class T>
24 inline constexpr T pow_constexpr_fast_inv(T
a, T
a_inv)
noexcept {
26 if constexpr (
power < 0) {
28 }
else if constexpr (
power == 0) {
30 }
else if constexpr (
power % 2 == 0) {
31 T tmp = pow_constexpr_fast_inv<
power / 2>(
a,
a_inv);
33 }
else if constexpr (
power % 2 == 1) {
34 T tmp = pow_constexpr_fast_inv<(
power - 1) / 2>(
a,
a_inv);
namespace for basic c++ utilities
void throw_with_loc(std::string message, SourceLocation loc=SourceLocation{})
Throw an exception and append the source location to it.