ShaiviAgarwal2 commented on issue #36612: URL: https://github.com/apache/arrow/issues/36612#issuecomment-1811714791
@pitrou To ensure compatibility between `std::span `and `arrow::util::span`, we need to modify the `arrow::util::span` class to meet the requirements of `std::span`. This can be done by adding the necessary member functions and type aliases to `arrow::util::span`. We also need to specialize the `std::ranges::enable_borrowed_range` template for `arrow::util::span` to indicate that it is a borrowed range. Finally, we need to add feature detection to check if `std::span` is available and use it if it is, falling back to `arrow::util::span` otherwise. Here's the plan in pseudocode: 1. Check if __cpp_lib_span is defined to determine if std::span is available. 2. If std::span is available, define arrow::util::span as an alias for std::span. 3. If std::span is not available, define arrow::util::span as a separate class that meets the requirements of std::span. 4. Add the necessary member functions and type aliases to arrow::util::span to meet the requirements of std::span. 5. Specialize the std::ranges::enable_borrowed_range template for arrow::util::span to indicate that it is a borrowed range. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
