id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 4744,Some handler arguments are not passed as lvalues,chris_kohlhoff,chris_kohlhoff,"Some handler arguments (e.g. those passed by async_read() and other composed asynchronous operations) are not being passed as lvalues. This prevents interoperability with some implementations of std::tr1::bind. The following program should compile correctly: {{{ #include #include struct handler { template void operator()(T1&, T2&) {} }; class match_char { public: explicit match_char(char c) : c_(c) {} template std::pair operator()( Iterator begin, Iterator end) const { Iterator i = begin; while (i != end) if (c_ == *i++) return std::make_pair(i, true); return std::make_pair(i, false); } private: char c_; }; namespace boost { namespace asio { template <> struct is_match_condition : public boost::true_type {}; } // namespace asio } // namespace boost int main() { boost::asio::io_service io_service; boost::asio::ip::tcp::socket sock(io_service); char buf[1024]= """"; boost::asio::streambuf sb; boost::asio::async_read(sock, boost::asio::buffer(buf), handler()); boost::asio::async_write(sock, boost::asio::buffer(buf), handler()); boost::asio::async_read(sock, sb, handler()); boost::asio::async_write(sock, sb, handler()); boost::asio::async_read_until(sock, sb, '\n', handler()); boost::asio::async_read_until(sock, sb, ""\n"", handler()); boost::asio::async_read_until(sock, sb, boost::regex(""\n""), handler()); boost::asio::async_read_until(sock, sb, match_char('\n'), handler()); } }}}",Bugs,closed,To Be Determined,asio,Boost 1.44.0,Problem,fixed,,