Boost C++ Libraries: Ticket #13564: Compile error of asio::async_read_until https://svn.boost.org/trac10/ticket/13564 <p> I have a new compile error after moving from asio in 1.65.1 to asio in 1.67.0. Same code which compiled fine before. async_read_until uses read_until_delim_string_op in read_until.hpp, and the ctor has been rewritten in 67.0. It seems to want now to copy the buffer in the first constructor. Buffers are non copyable, so there is a compile error. </p> <p> The 67.0 ctor is now a template: </p> <blockquote> <p> template &lt;typename <a class="missing wiki">BufferSequence</a>&gt; read_until_delim_string_op(<a class="missing wiki">AsyncReadStream</a>&amp; stream, </p> <blockquote> <p> BOOST_ASIO_MOVE_ARG(<a class="missing wiki">BufferSequence</a>) buffers, const std::string&amp; delim, <a class="missing wiki">ReadHandler</a>&amp; handler) </p> </blockquote> <p> : stream_(stream), </p> <blockquote> <p> buffers_(BOOST_ASIO_MOVE_CAST(<a class="missing wiki">BufferSequence</a>)(buffers)), delim_(delim), start_(0), search_position_(0), handler_(BOOST_ASIO_MOVE_CAST(<a class="missing wiki">ReadHandler</a>)(handler)) </p> </blockquote> </blockquote> <blockquote> <p> { } </p> </blockquote> <p> In 65.1 the ctor was: </p> <blockquote> <p> read_until_delim_op(<a class="missing wiki">AsyncReadStream</a>&amp; stream, </p> <blockquote> <p> boost::asio::basic_streambuf&lt;Allocator&gt;&amp; streambuf, char delim, <a class="missing wiki">ReadHandler</a>&amp; handler) </p> </blockquote> <p> : stream_(stream), </p> <blockquote> <p> streambuf_(streambuf), delim_(delim), start_(0), search_position_(0), handler_(BOOST_ASIO_MOVE_CAST(<a class="missing wiki">ReadHandler</a>)(handler)) </p> </blockquote> </blockquote> <p> I have gcc 8.1. Not sure if this is a bug (it sounds like it), therefore logging this as "Support Request" for now. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13564 Trac 1.4.3 anonymous Mon, 02 Jul 2018 15:27:19 GMT type changed https://svn.boost.org/trac10/ticket/13564#comment:1 https://svn.boost.org/trac10/ticket/13564#comment:1 <ul> <li><strong>type</strong> <span class="trac-field-old">Support Requests</span> → <span class="trac-field-new">Bugs</span> </li> </ul> Ticket anonymous Mon, 02 Jul 2018 15:27:55 GMT <link>https://svn.boost.org/trac10/ticket/13564#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13564#comment:2</guid> <description> <p> Upgrading to a "bug" as no answer after 7 weeks. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Mon, 02 Jul 2018 15:31:39 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/13564#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13564#comment:3</guid> <description> <p> Here is the compilation error reported by LLVM (which does report an issue, like g++-8): </p> <p> In file included from /usr/local/include/boost/asio.hpp:113: In file included from /usr/local/include/boost/asio/read_until.hpp:1824: /usr/local/include/boost/asio/impl/read_until.hpp:680:9: error: call to implicitly-deleted copy constructor of 'hx2a::tcp::streambuf' </p> <blockquote> <p> buffers_(BOOST_ASIO_MOVE_CAST(<a class="missing wiki">BufferSequence</a>)(buffers)), <sup> <del></del><del></del><del></del><del></del><del></del><del></del><del></del><del></del><del></del><del></del><del></del>~ </sup></p> </blockquote> <p> /usr/local/include/boost/asio/impl/read_until.hpp:912:3: note: in instantiation of function template specialization 'boost::asio::detail ::read_until_delim_string_op&lt;boost::asio::basic_stream_socket&lt;boost::asio::ip::tcp&gt;, hx2a::tcp::streambuf, (lambda at /usr/local/hx2a/C+ +/public/include/hx2a/couchdb.hpp:511:6)&gt;::read_until_delim_string_op&lt;hx2a::tcp::streambuf &amp;&gt;' requested here </p> <blockquote> <p> detail::read_until_delim_string_op&lt;<a class="missing wiki">AsyncReadStream</a>, <sup> </sup></p> </blockquote> </description> <category>Ticket</category> </item> </channel> </rss>