Re: [Capy review] Some questions
Vinnie Falco via Boost <[email protected]> Wed, 24 Jun 2026 09:00:01 -0700
| Newsgroups | gmane.comp.lib.boost.devel |
|---|---|
| Message-ID | <CA+EzHGfXhx+9HrJU5qL5uoXcReJ6SRbC5yq15TC_cTwpCWo+yA@mail.gmail.com> |
On Wed, Jun 24, 2026 at 8:34 AM Peter Dimov via Boost <[email protected]> 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. > 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. This way we don't need the full strength of an explicit concept, yet we can still get the benefits. This is the approach Asio uses (const_buffer and mutable_buffer are constructible from span). Thanks _______________________________________________ Boost mailing list -- [email protected] To unsubscribe send an email to [email protected] https://lists.boost.org/mailman3/lists/boost.lists.boost.org/ Archived at: https://lists.boost.org/archives/list/[email protected]/message/V2GR2ZJJXGYP66J6EX4TJSAYRI3GIO5B/