diff --git a/cpp/src/arrow/compute/kernels/codegen_internal.h b/cpp/src/arrow/compute/kernels/codegen_internal.h index 405f35a9234b..d1b3f3528c2f 100644 --- a/cpp/src/arrow/compute/kernels/codegen_internal.h +++ b/cpp/src/arrow/compute/kernels/codegen_internal.h @@ -17,7 +17,6 @@ #pragma once -#include #include #include #include @@ -1236,7 +1235,7 @@ struct GeneratorApplicator { template class Generator, typename... Args> - requires std::invocable + requires std::is_invocable_v auto GenerateKernelExecImpl(Type::type id) { constexpr auto kNumTypeIds = std::tuple_size_v; static_assert(ArrayIndex < kNumTypeIds); @@ -1272,7 +1271,7 @@ auto GenerateKernelExecImpl(Type::type id) { template class Generator, typename... Args> - requires std::invocable + requires std::is_invocable_v auto GenerateKernelExec(detail::GetTypeId get_id) { return detail::GenerateKernelExecImpl(get_id.id); diff --git a/cpp/src/parquet/column_reader.cc b/cpp/src/parquet/column_reader.cc index 6aca8a23ce16..b9621ee32864 100644 --- a/cpp/src/parquet/column_reader.cc +++ b/cpp/src/parquet/column_reader.cc @@ -85,8 +85,9 @@ inline void CheckNumberDecoded(int64_t number_decoded, int64_t expected) { /// True if a T can hold a U. template -inline constexpr bool can_hold_v = std::in_range(std::numeric_limits::min()) && - std::in_range(std::numeric_limits::max()); +inline constexpr bool can_hold_v = + std::numeric_limits::digits >= std::numeric_limits::digits && + (std::numeric_limits::is_signed || !std::numeric_limits::is_signed); /// Clamp to a given type. template