Subject: [Boost-bugs] [Boost C++ Libraries] #11913: free functions should support StreamBuffer concept
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-01-14 21:18:42
#11913: free functions should support StreamBuffer concept
------------------------------+----------------------------
Reporter: vinnie.falco@⦠| Owner: chris_kohlhoff
Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: asio
Version: Boost 1.61.0 | Severity: Problem
Keywords: |
------------------------------+----------------------------
Functions like ```boost::asio::read``` which take
```boost::asio::basic_streambuf<>``` as parameters should instead take the
stream buffer by template argument. A new concept ```StreamBuffer```
should be added under "Type Requirements" in the reference.
Rationale: boost free functions should work with user defined stream
buffers that meet the requirements. The asio reference alludes to this
functionality in the description for ```basic_streambuf```:
"The basic_streambuf class's public interface is intended to permit the
following implementation strategies:..."
However without support for types that meet the requirements, user defined
stream buffers cannot provide alternate implementation strategies that
work with asio free functions.
Example of a user defined streambuf with a compatible interface:
https://github.com/ripple/rippled/blob/develop/src/beast/beast/asio/streambuf.h#L38
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11913> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC