[Boost-bugs] [Boost C++ Libraries] #13564: Compile error of asio::async_read_until

Subject: [Boost-bugs] [Boost C++ Libraries] #13564: Compile error of asio::async_read_until
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2018-05-13 11:28:16


#13564: Compile error of asio::async_read_until
-------------------------------------------------+-------------------------
 Reporter: Vincent Lextrait | Owner:
  <vincent.lextrait@…> | chris_kohlhoff
     Type: Support Requests | Status: new
Milestone: To Be Determined | Component: asio
  Version: Boost 1.67.0 | Severity: Problem
 Keywords: |
-------------------------------------------------+-------------------------
 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.

 The 67.0 ctor is now a template:

     template <typename BufferSequence>
     read_until_delim_string_op(AsyncReadStream& stream,
         BOOST_ASIO_MOVE_ARG(BufferSequence) buffers,
         const std::string& delim, ReadHandler& handler)
       : stream_(stream),
         buffers_(BOOST_ASIO_MOVE_CAST(BufferSequence)(buffers)),
         delim_(delim),
         start_(0),
         search_position_(0),
         handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
     {
     }

 In 65.1 the ctor was:

     read_until_delim_op(AsyncReadStream& stream,
         boost::asio::basic_streambuf<Allocator>& streambuf,
         char delim, ReadHandler& handler)
       : stream_(stream),
         streambuf_(streambuf),
         delim_(delim),
         start_(0),
         search_position_(0),
         handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))

 I have gcc 8.1.
 Not sure if this is a bug (it sounds like it), therefore logging this as
 "Support Request" for now.

-- 
Ticket URL: <https://svn.boost.org/trac10/ticket/13564>
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 : 2018-05-13 11:34:21 UTC