diff --git a/cpp/src/arrow/compute/kernels/scalar_cast_numeric.cc b/cpp/src/arrow/compute/kernels/scalar_cast_numeric.cc index a02f83351b306..b054e57f04d12 100644 --- a/cpp/src/arrow/compute/kernels/scalar_cast_numeric.cc +++ b/cpp/src/arrow/compute/kernels/scalar_cast_numeric.cc @@ -286,7 +286,8 @@ struct ParseString { }; template -struct CastFunctor> { +struct CastFunctor< + O, I, enable_if_t<(is_number_type::value && is_base_binary_type::value)>> { static Status Exec(KernelContext* ctx, const ExecSpan& batch, ExecResult* out) { return applicator::ScalarUnaryNotNull>::Exec(ctx, batch, out); } diff --git a/cpp/src/arrow/compute/kernels/scalar_cast_temporal.cc b/cpp/src/arrow/compute/kernels/scalar_cast_temporal.cc index 49c03395d37e0..a5612643913aa 100644 --- a/cpp/src/arrow/compute/kernels/scalar_cast_temporal.cc +++ b/cpp/src/arrow/compute/kernels/scalar_cast_temporal.cc @@ -483,8 +483,8 @@ struct ParseDate { }; template - struct CastFunctor < O, - I, enable_if_t<(is_date_type::value && is_string_type::value)>> { +struct CastFunctor::value && is_string_type::value)>> { static Status Exec(KernelContext* ctx, const ExecSpan& batch, ExecResult* out) { return applicator::ScalarUnaryNotNull>::Exec(ctx, batch, out); }