| 82 | |
| 83 | template <typename Enum, typename CType = typename std::underlying_type<Enum>::type> |
| 84 | Result<Enum> ValidateEnumValue(CType raw) { |
| 85 | for (auto valid : EnumTraits<Enum>::values()) { |
| 86 | if (raw == static_cast<CType>(valid)) { |
| 87 | return static_cast<Enum>(raw); |
| 88 | } |
| 89 | } |
| 90 | return Status::Invalid("Invalid value for ", EnumTraits<Enum>::name(), ": ", raw); |
| 91 | } |
| 92 | |
| 93 | class ARROW_EXPORT GenericOptionsType : public FunctionOptionsType { |
| 94 | public: |