id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 13291,read_until won't compile with Visual Studio 2017 using regex,Ville-Pekka Vahteala ,chris_kohlhoff,"Compiling following code will produce compiler error {{{ #include #include #include #include #include int main() { boost::asio::io_service ios; boost::asio::ip::tcp::socket s(ios); boost::asio::streambuf b; boost::system::error_code e; boost::asio::read_until(s, b, boost::regex(""i am just a regex""), e); } }}} {{{ 1>d:\source\boost\boost\asio\impl\read_until.hpp(273): error C2664: 'size_t boost::asio::basic_streambuf>::read_size_helper(boost::asio::basic_streambuf> &,::size_t)': cannot convert argument 1 from 'boost::asio::basic_streambuf_ref' to 'boost::asio::basic_streambuf> &' 1> with 1> [ 1> Allocator=std::allocator 1> ] 1>d:\source\boost\boost\asio\impl\read_until.hpp(404): note: see reference to function template instantiation 'size_t boost::asio::read_until>(SyncReadStream &,DynamicBuffer &&,const boost::regex &,boost::system::error_code &)' being compiled 1> with 1> [ 1> SyncReadStream=boost::asio::ip::tcp::socket, 1> Allocator=std::allocator, 1> DynamicBuffer=boost::asio::basic_streambuf_ref> 1> ] 1>c:\users\????\error.cpp(12): note: see reference to function template instantiation 'size_t boost::asio::read_until>(SyncReadStream &,boost::asio::basic_streambuf> &,const boost::regex &,boost::system::error_code &)' being compiled 1> with 1> [ 1> SyncReadStream=boost::asio::ip::tcp::socket 1> ] }}} This can be solved by using same calculation as other methods use {{{ // Need more data. std::size_t bytes_to_read = std::min( std::max(512, b.capacity() - b.size()), std::min(65536, b.max_size() - b.size())); }}} instead of {{{ std::size_t bytes_to_read = read_size_helper(b, 65536); }}} ",Bugs,new,To Be Determined,asio,Boost 1.66.0,Showstopper,,"asio, regex",