On 24 Jun 2026 20:38, Vinnie Falco via Boost wrote:
On Wed, Jun 24, 2026 at 10:34 AM Peter Dimov <pdimov@gmail.com> wrote:
I assume you mean array<span<byte const>, 3> here.
Yes
...the set of types considered buffers is closed, because const_buffer only has a finite set of constructors
Not if the constructor is a template. I realize that this is heading in the direction of being functionally equivalent to the concept yet I still prefer const_buffer and mutable_buffer as the delivery vehicle rather than the named concept. If for no other reason, that Kohlhoff did it that way and without knowing his rationale I lean towards doing the same.
I suspect one reason is that concepts as a core language feature did not exist when ASIO was designed. Which is not a good reason for a newly designed library targeting modern C++.