Boost logo

Boost :

From: Julien Blanc (julien.blanc_at_[hidden])
Date: 2023-01-31 09:33:02


Le 2023-01-31 07:30, Gavin Lambert via Boost a écrit :
> On 28/01/2023 08:34, Vinnie Falco wrote:
>> Greetings. I am asking if there is any interest in a Boost.Buffers
>> library, which consists of the following:
>
> I am a little hesitant in breaking this off from Asio, since as
> Klemens pointed out it would be unusual to not have the header
> available, and since whatever is in Asio is already
> somewhat-standards-adjacent with some third party implementations
> already, making them _almost_ vocabulary types anyway. (Though of
> course "almost" compiles no code.)

A buffer concept has use cases outside the usual targets of asio (think
of MCUs). C++/Boost currently lack a fixed size circular_buffer
implementation, for example.

That being said, i think we currently have a vocabulary type for
non-owning non-resizable buffers: it's called span<byte>. Maybe an
owning span would make some sense, to be able to transfer ownership of
the underlying memory. Outside this, i'm not sure. IMHO a buffer is
often just a special use case of a container.

Regards,
Julien


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk