Vinnie Falco wrote:
On Wed, Jun 24, 2026 at 8:34 AM Peter Dimov via Boost <boost@lists.boost.org <mailto:boost@lists.boost.org> > wrote:
I've never been particularly fond of the Asio requirement that buffers need to be convertible specifically to the concrete types const_buffer and mutable_buffer.
I like it
(Among other things, this requires physical coupling.)
Not necessarily.
Yes it does.
It being 2026, maybe we should explore the more principled
concept MutableBuffer; concept ConstBuffer;
No I don't like that at all. A sequence concept makes sense. A concept for a pointer and size pair seems overkill.
Note, whatever definition you give the concept, we could simply add as an explicit constructor to const_buffer and mutable_buffer, and then the convertibility requirement would be satisfied.
You need the definitions of const_buffer and mutable_buffer to be available in order to see whether they have constructors from this or that, which requires physical coupling.
This way we don't need the full strength of an explicit concept, yet we can still get the benefits.
I have no idea what "full strength" there is. A concept is a concept, it's not any more complicated or strong than a concrete type. You already have the concept, you just don't name it. "Convertible to const_buffer" is as much a concept as any other, and there's no "full" or "partial" strength involved anywhere. Sticking your head in the sand and pretending you don't have buffer concepts doesn't magically make them cease to exist.