Re: [Capy review] Some questions

Peter Dimov via Boost <[email protected]> Wed, 24 Jun 2026 20:34:14 +0300
Newsgroups gmane.comp.lib.boost.devel
Message-ID <[email protected]>
Vinnie Falco wrote:
> On Wed, Jun 24, 2026 at 10:21 AM Peter Dimov <[email protected]
> <mailto:[email protected]> > wrote:
> 
> 	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.
> 
> 
> 
> If const_buffer was constructible from span<byte> then this is a perfectly valid
> buffer sequence which does not require physical coupling:
> 
>     array<const_buffer, 3>

I assume you mean array<span<byte const>, 3> here.

> 	> 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.
> 
> 
> 
> A concept is stronger than a concrete type because a concrete type comes in
> exactly one formulation while types which satisfy a concept comes in infinite
> formulations.

Right. So the set of types considered buffers is closed, because const_buffer
only has a finite set of constructors, which is unlike a concept that can be
satisfied by an unbounded set of user-defined types that do not require your
explicit constructor-based blessing.

And you consider this an argument in favor.


_______________________________________________
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/FXYGIWRN6SZKQ6WD2BPQ3C3W5N2TV4MO/