On 25/06/2017 22:48, Vinnie Falco via Boost wrote:
On Sun, Jun 25, 2017 at 2:36 PM, Niall Douglas via Boost
wrote: 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:
Think gsl::span
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.
Hmm. I find that highly surprising. I'd have thought that as the HTTP data comes in - in chunks - your code would work with discontiguous storage. Are you memory copying instead? Niall -- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/