On Sun, Jun 25, 2017 at 2:36 PM, Niall Douglas via Boost
Where you need to consume or produce arbitrary scatter-gather buffers, use gsl::span<T> or equivalent.
As gsl::span<> is only capable of representing ranges of elements contiguous in memory, it is not capable of representing the majority of Beast's buffer sequences. Examples: https://github.com/vinniefalco/Beast/blob/8982e14aa65b9922ac5a00e5a5196a08df... https://github.com/vinniefalco/Beast/blob/8982e14aa65b9922ac5a00e5a5196a08df... https://github.com/vinniefalco/Beast/blob/8982e14aa65b9922ac5a00e5a5196a08df... Using gsl::span<> effectively type-erases the buffer sequence which is inefficient, since it must be copied to a vector equivalent in order to be used.
I certainly can see that char iterators are going to get used a lot
Beast never templates on the character type. All operations on structured data (for example HTTP headers) are performed on a single contiguous memory buffer of chars. This is done for performance reasons.