Boost C++ Libraries: Ticket #9001: asio::buffered_stream and family missing future returns https://svn.boost.org/trac10/ticket/9001 <p> I'm practically a novice but it seems that <strong>asio::buffered_read_stream</strong> and <strong>asio::buffered_write_stream</strong> async operations are missing the futures return value. I believe that <strong>asio::buffered_read_stream::async_read_some</strong> should have a function signature that looks like this: </p> <pre class="wiki"> template &lt;typename MutableBufferSequence, typename ReadHandler&gt; BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, void (boost::system::error_code, std::size_t)) async_read_some(const MutableBufferSequence&amp; buffers, BOOST_ASIO_MOVE_ARG(ReadHandler) handler) </pre><p> I marked this as "Problem" because it is not possible to wrap either of these objects in such a way that they are fully compatible with future returns. </p> <p> Note that classes like <strong>asio::basic_stream_socket</strong> all provide futures return values for async functions (when supported by the build configuration). </p> <p> If I am incorrect please advise me so I can correct my own code because this is the model I am following </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9001 Trac 1.4.3 anonymous Wed, 21 Aug 2013 20:22:50 GMT <link>https://svn.boost.org/trac10/ticket/9001#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9001#comment:1</guid> <description> <p> It seems this is not a "std::future" return but more, a specialization of asio::async_result&lt;&gt; that allows a handler to produce a return value from an initiating function. </p> <p> If user-defined handlers are going to be able to perfectly wrap boost::asio objects then they need ways of returning the async_result without relying on classes in a detail namespace. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>chris_kohlhoff</dc:creator> <pubDate>Tue, 01 Oct 2013 09:18:16 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/9001#comment:2 https://svn.boost.org/trac10/ticket/9001#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Fixed on trunk in <a class="changeset" href="https://svn.boost.org/trac10/changeset/85798" title="Update buffered stream operations to adhere to current handler patterns. ">[85798]</a>. Merged to release in <a class="changeset" href="https://svn.boost.org/trac10/changeset/85838" title="Merge asio from trunk. ...">[85838]</a>. See also <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/9000" title="#9000: Feature Requests: asio::buffered_stream and family missing rvalue-move support (closed: fixed)">#9000</a>. </p> Ticket