Skip to content

discussion: buffer type naming and concept taxonomy #413

Description

@sgerbino

From the review result:

I'm unpersuaded that the current design handles the buffer abstractions and buffer concepts correctly. [...] the asio derived mutable and const buffer types become the foundation. [...] These two types are actually minimalist versions of std::span. [...]

 std::array<char, 1024> buf;
 auto buffer = capy::make_buffer( buf ); // make a view of the buffer not an actual buffer

[...] I'd be much happier if this api used the terms buffer_span or buffer_ref to clarify what the types mean. Even though that breaks from asio tradition the concept of a span was developed later.

The review also sketches dimensions a richer buffer concept set could express (storage, capacity, access, ownership, flow direction, range type, consumption, lifetime) and asks for this to be discussed in a separate mailing-list thread.

Source: Boost review result (conditional acceptance), Boost mailing list, September 2026.

Current state: mutable_buffer, const_buffer, and make_buffer are unchanged; the concept taxonomy recently moved in the opposite direction (the source/sink concept family was removed post-review, and #393/#396 already contest parts of that). This issue records the review item and will link the mailing-list thread once it starts; the direction should be settled there, not here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status
      Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions