| 67 | |
| 68 | template <typename Enum, typename CType = typename std::underlying_type<Enum>::type> |
| 69 | Result<Enum> ValidateEnumValue(CType raw) { |
| 70 | for (auto valid : EnumTraits<Enum>::values()) { |
| 71 | if (raw == static_cast<CType>(valid)) { |
| 72 | return static_cast<Enum>(raw); |
| 73 | } |
| 74 | } |
| 75 | return Status::Invalid("Invalid value for ", EnumTraits<Enum>::name(), ": ", raw); |
| 76 | } |
| 77 | |
| 78 | class ARROW_EXPORT GenericOptionsType : public FunctionOptionsType { |
| 79 | public: |