Opened 8 years ago

Last modified 6 years ago

#10072 new Bugs

filtering_stream::size() is not const

Reported by: Georg Baum <Georg.Baum@…> Owned by: Jonathan Turkanis
Milestone: To Be Determined Component: iostreams
Version: Boost 1.55.0 Severity: Problem
Keywords: Cc:

Description

According to the documentation at http://www.boost.org/doc/libs/1_55_0/libs/iostreams/doc/classes/filtering_stream.html, filtering_stream::size() should be const, but it is declared non-const. The implementation does not change the class (it calls the const metzhod chain_->size()). Therefore I believe that the non-constness is an oversight. Please make size() const to match the documentation.

Change History (2)

comment:1 by n.musolino@…, 6 years ago

I recently encountered this problem, and I can submit a patch. Do the iostreams maintainers agree that making this function 'const', in agreement with the documentation, is reasonable?

comment:2 by n.musolino@…, 6 years ago

The simple fix is in the pipeline (appears to be in the 'develop' branch as of this date): https://github.com/boostorg/iostreams/pull/5

Note: See TracTickets for help on using tickets.