Re: [Capy review] Some questions

Andrey Semashev via Boost <[email protected]> Wed, 24 Jun 2026 23:49:21 +0300
Newsgroups gmane.comp.lib.boost.devel
Message-ID <[email protected]>
On 24 Jun 2026 22:21, Vinnie Falco wrote:
> On Wed, Jun 24, 2026 at 11:37 AM Andrey Semashev via Boost
> <[email protected] <mailto:[email protected]>> wrote:
> 
>     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++.
> 
> Let me dispel that misconception.
> 
> Here is the ConstBufferSequence concept definition:
> 
> https://www.boost.org/doc/libs/1_36_0/doc/html/boost_asio/reference/
> ConstBufferSequence.html <https://www.boost.org/doc/libs/1_36_0/doc/
> html/boost_asio/reference/ConstBufferSequence.html>
> 
> This is the 2013 version of the library, seven years before the
> `concept` keyword was added to C++20.
> 
> The "concept" for the value type of buffer sequences is what Peter said:
> ConvertibleToConstBuffer (also located on the page)

As Peter said, concepts as a concept (sorry for the pun) existed long
before they were added as a language feature. Though the documentation
described the ConstBufferSequence concept, the implementation could not
have used it. Even later, when concepts were added to C++, the
implementation could not be changed easily because that could break
existing users. This is not a consideration for a brand new library.

_______________________________________________
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/47WWPOG7VNUCBTZ75QJ3TUN3ZTXVJJQX/