id summary reporter owner description type status milestone component version severity resolution keywords cc 8464 boost::asio::read_size_helper non consistent with boost::asio::basic_streambuf::read_size_helper Thomas Riccardi chris_kohlhoff "In boost 1.53.0 and svn trunk r83967 (current HEAD) in asio/basic_streambuf.hpp the function ''read_size_helper'' is defined two times: 1/ in ''basic_streambuf'' class l344: {{{ // Helper function to get the preferred size for reading data. friend std::size_t read_size_helper( basic_streambuf& sb, std::size_t max_size) { return std::min( std::max(512, sb.buffer_.capacity() - sb.size()), std::min(max_size, sb.max_size() - sb.size())); } }}} 2/ as a free function l356: {{{ // Helper function to get the preferred size for reading data. Used for any // user-provided specialisations of basic_streambuf. template inline std::size_t read_size_helper( basic_streambuf& sb, std::size_t max_size) { return std::min(512, std::min(max_size, sb.max_size() - sb.size())); } }}} They don't compute the same value: 1/ returns a number between 512 and max_size if max_size > 512 (which happens in several locations in the code), otherwise returns max_size. 2/ returns at most 512. Shouldn't they return the same thing? It seems to me the intended result is 1/. " Bugs closed To Be Determined asio Boost Development Trunk Problem invalid