| 44 | {} |
| 45 | template <typename T> |
| 46 | constexpr auto operator()(T x, T y) const |
| 47 | { |
| 48 | switch (mOp) |
| 49 | { |
| 50 | case Op::kADD: return x + y; |
| 51 | case Op::kSUB: return x - y; |
| 52 | case Op::kMUL: return x * y; |
| 53 | case Op::kDIV: return x / y; |
| 54 | } |
| 55 | throw std::runtime_error{"Never reach here!"}; |
| 56 | } |
| 57 | }; |
| 58 | |
| 59 | namespace op |
nothing calls this directly
no outgoing calls
no test coverage detected