| 434 | } |
| 435 | |
| 436 | numeric operator^(const numeric &rhs) const noexcept |
| 437 | { |
| 438 | switch (get_composite_type(type, rhs.type)) { |
| 439 | default: |
| 440 | case 0b00: |
| 441 | return std::pow(data._num, rhs.data._num); |
| 442 | case 0b01: |
| 443 | return std::pow(data._num, rhs.data._int); |
| 444 | case 0b10: |
| 445 | return std::pow(data._int, rhs.data._num); |
| 446 | case 0b11: |
| 447 | return int_pow(data._int, rhs.data._int); |
| 448 | } |
| 449 | } |
| 450 | |
| 451 | template <typename T, typename = std::enable_if_t<!std::is_same<std::decay_t<T>, numeric>::value>> |
| 452 | numeric operator^(T &&rhs) const noexcept |