You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rename operator+= for const_buffer and mutable_buffer #430
For a type that represents a sequence of byes bound from two sides, operator+= does not generalize from raw pointers unambiguously and has counterintuitive semantics:
operator+= associated with "increasing" actually shrinks the buffer.
std::string which can be made a buffer, uses operator+= for something completely different.
Please use a named member function for this purpose, like .consume_prefix().
Activity
akrzemi1 commentedon Oct 1, 2026
remove_prefix sounds like a natural candidate with a precedent.