| 317 | |
| 318 | template <typename T> |
| 319 | Result<T> CIntFromRScalarImpl(int64_t value) { |
| 320 | if (value < std::numeric_limits<T>::min() || value > std::numeric_limits<T>::max()) { |
| 321 | return Status::Invalid("value outside of range"); |
| 322 | } |
| 323 | return static_cast<T>(value); |
| 324 | } |
| 325 | |
| 326 | template <> |
| 327 | Result<uint64_t> CIntFromRScalarImpl<uint64_t>(int64_t value) { |