Skip to content

[C++] std::invocable and std::in_range fail to compile with CRAN's macOS 11.3 SDK #55429

Closed

Description

@thisisnic

The test-r-macos-as-cran nightly cran-release job, which builds Arrow C++ from source against the macOS 11.3 SDK that CRAN uses, has been failing since 2026-11-01. The 11.3 SDK's libc++ has partial C++20 library support and is missing two things we use:

  1. std::invocable in codegen_internal.h (since 2026-11-03, introduced in GH-55312: [C++][Compute] More flexible kernel exec generation #55291):

     cpp/src/arrow/compute/kernels/codegen_internal.h:1239:17: error: no member named 'invocable' in namespace 'std'
     cpp/src/arrow/compute/kernels/codegen_internal.h:1275:17: error: no member named 'invocable' in namespace 'std'
    

    Failing lines:

    requires std::invocable<decltype(Transform), Type::type>
    and
    requires std::invocable<decltype(Transform), Type::type>

    std::same_as exists in this libc++ but std::invocable does not. The fix is to use std::is_invocable_v in the requires clauses instead.

  2. std::in_range in column_reader.cc (since 2026-11-01, introduced in GH-50628: [C++][Parquet] Rework RecordReader to introduce flat optional optimization #50629):

     cpp/src/parquet/column_reader.cc:88:41: error: no member named 'in_range' in namespace 'std'
    

    Failing lines:

    /// 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());

    std::in_range was added in libc++ 13. The fix is to write the range check directly in terms of std::numeric_limits.

The std::invocable error occurs earlier in the build and masks the std::in_range one, so both need fixing for the job to pass. Originally tracked separately as GH-55430, now folded into this issue.

Failing runs: https://github.com/ursacomputing/crossbow/actions/runs/41278980783 (2026-11-01, in_range) and https://github.com/ursacomputing/crossbow/actions/runs/42175710706 (2026-11-06, invocable)

Same class of problem as GH-49176 and GH-53945.

This issue was drafted by Claude from the crossbow nightly logs and reviewed by Nic Crane before posting.

Activity

  1. added this to the 27.0.0 milestone on Nov 6, 2026
  2. changed the title [-][C++][Compute] std::invocable in codegen_internal.h fails to compile with CRAN's macOS 11.3 SDK[/-] [+][C++] std::invocable in codegen_internal.h fails to compile with CRAN's macOS 11.3 SDK[/+] on Nov 6, 2026
  3. changed the title [-][C++] std::invocable in codegen_internal.h fails to compile with CRAN's macOS 11.3 SDK[/-] [+][C++] std::invocable and std::in_range fail to compile with CRAN's macOS 11.3 SDK[/+] on Nov 9, 2026
  4. added a commit that references this issue on Nov 9, 2026
  5. thisisnic commented on Nov 9, 2026

    @thisisnic
    MemberAuthor

    Issue resolved by pull request 55457
    #55457

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions