sjperkins opened a new issue, #40366: URL: https://github.com/apache/arrow/issues/40366
### Describe the bug, including details regarding any error messages, version, and platform. #38027 added `Buffer::span_as` and `Buffer::mutable_span_as` `mutable_span_as` has a const qualifier, https://github.com/apache/arrow/blob/53e0c745ad491af98a5bf18b67541b12d7790beb/cpp/src/arrow/buffer.h#L265-L274 but this prevents the call to `mutable_data_as` during compile: ```bash ...include/arrow/buffer.h:273:41: error: passing ‘const arrow::Buffer’ as ‘this’ argument discards qualifiers [-fpermissive] 273 | return util::span(mutable_data_as<T>(), static_cast<size_t>(size() / sizeof(T))); ``` By contrast, both `span_as` and `data_as` have const qualifiers. https://github.com/apache/arrow/blob/53e0c745ad491af98a5bf18b67541b12d7790beb/cpp/src/arrow/buffer.h#L228-L241 Also, `mutable_span_as` should not have a const qualifier as it implies modification of `arrow::Buffer`. ### Component(s) C++ -- 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]
