On 24 Jun 2026 22:21, Vinnie Falco wrote:
On Wed, Jun 24, 2026 at 11:37 AM Andrey Semashev via Boost <boost@lists.boost.org <mailto:boost@lists.boost.org>> 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.