Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions cpp/src/arrow/compute/kernels/codegen_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

#pragma once

#include <concepts>
#include <cstdint>
#include <cstring>
#include <memory>
Expand Down Expand Up @@ -1236,7 +1235,7 @@ struct GeneratorApplicator<Generator, Arg1, WithFirstTypeTwice, Args...> {

template <auto Transform, auto TypeIdArray, size_t ArrayIndex,
template <typename...> class Generator, typename... Args>
requires std::invocable<decltype(Transform), Type::type>
requires std::is_invocable_v<decltype(Transform), Type::type>
auto GenerateKernelExecImpl(Type::type id) {
constexpr auto kNumTypeIds = std::tuple_size_v<decltype(TypeIdArray)>;
static_assert(ArrayIndex < kNumTypeIds);
Expand Down Expand Up @@ -1272,7 +1271,7 @@ auto GenerateKernelExecImpl(Type::type id) {

template <auto Transform, auto TypeIdArray, template <typename...> class Generator,
typename... Args>
requires std::invocable<decltype(Transform), Type::type>
requires std::is_invocable_v<decltype(Transform), Type::type>
auto GenerateKernelExec(detail::GetTypeId get_id) {
return detail::GenerateKernelExecImpl<Transform, TypeIdArray, /*ArrayIndex=*/0,
Generator, Args...>(get_id.id);
Expand Down
5 changes: 3 additions & 2 deletions cpp/src/parquet/column_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ inline void CheckNumberDecoded(int64_t number_decoded, int64_t expected) {

/// True if a T can hold a U.
template <typename T, typename U>
inline constexpr bool can_hold_v = std::in_range<T>(std::numeric_limits<U>::min()) &&
std::in_range<T>(std::numeric_limits<U>::max());
inline constexpr bool can_hold_v =
std::numeric_limits<T>::digits >= std::numeric_limits<U>::digits &&
(std::numeric_limits<T>::is_signed || !std::numeric_limits<U>::is_signed);

/// Clamp to a given type.
template <typename T, typename U>
Expand Down
Loading