chriskohlhoff / asio

Asio C++ Library
http://think-async.com/Asio
4.81k stars 1.2k forks source link

fix call buffer(const const_buffers_1&,size_t) #1267

Open marian556 opened 1 year ago

marian556 commented 1 year ago

and call buffer(const mutable_buffers_1&,size_t) to get it working like they did in boost 1.79/asio 1.22 and before (compatibility issue) unless ASIO_BUFFER_ARG_BUFFERS_1_IS_BUFFERSEQUENCE is defined. There is a breaking undisclosed runtime change introduced in Asio 1.24.0 / Boost 1.80 : "Added buffer() overloads for contiguous containers, such as std::span" That change invokes incorrectly the generic overloads of function buffer designed for Generic Contiguous Sequences/Containers that const_buffers_1 meets technically ,but the sequence creates buffer of buffers pointing to const_buffers_1 class location , rather than to its underlaying data