Commits


Vyas Ramasubramani authored and GitHub committed ed19a921983
GH-40252: [C++] Make span SFINAE standards-conforming to enable compilation with nvcc (#40253) ### Rationale for this change The current code uses an incomplete type in a SFINAE construct. Closes #40252 ### What changes are included in this PR? This PR changes the way that the type is specified to avoid any UB. ### Are these changes tested? I tested locally that code that originally failed to compile with nvcc now compiles successfully. The same code also compiles under clang and gcc. This is a minimal reproducer: ``` #include <arrow/api.h> #include <vector> int main() { arrow::util::span<int> x{std::vector<int>{1, 2, 3}}; } ``` I did not include it here because it is a compile-time rather than runtime issue, and because at present it only manifests on nvcc. ### Are there any user-facing changes? No. * GitHub Issue: #40252 Authored-by: Vyas Ramasubramani <vyasr@nvidia.com> Signed-off-by: Antoine Pitrou <antoine@python.org>