Add explicit overflow-checked shortcuts, for easy benchmark parameterizing.
| 37 | |
| 38 | // Add explicit overflow-checked shortcuts, for easy benchmark parameterizing. |
| 39 | static Result<Datum> AddChecked(const Datum& left, const Datum& right, |
| 40 | ArithmeticOptions options = ArithmeticOptions(), |
| 41 | ExecContext* ctx = NULLPTR) { |
| 42 | options.check_overflow = true; |
| 43 | return Add(left, right, std::move(options), ctx); |
| 44 | } |
| 45 | |
| 46 | static Result<Datum> SubtractChecked(const Datum& left, const Datum& right, |
| 47 | ArithmeticOptions options = ArithmeticOptions(), |