Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10683: Boost.Iostreams: typos in the doc
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-11-04 09:13:27
#10683: Boost.Iostreams: typos in the doc
-------------------------------------+-----------------------
Reporter: akim demaille <akim@â¦> | Owner: turkanis
Type: Bugs | Status: new
Milestone: To Be Determined | Component: iostreams
Version: Boost 1.56.0 | Severity: Cosmetic
Resolution: | Keywords:
-------------------------------------+-----------------------
Comment (by akim demaille <akim@â¦>):
In http://www.boost.org/doc/libs/1_56_0/libs/iostreams/doc/index.html, one
reads
{{{
template<typename Sink>
std::streamsize write(Sink& dest, const char* s, std::streamsize n)
{
std::streamsize z;
for (z = 0; z < n; ++z) {
int c = s[z];
skip_ = c == comment_char_ ?
true :
c == '\n' ?
false :
skip_;
if (skip_)
continue;
if (!iostreams::put(dest, c))
break;
}
return z;
}
}}}
You may want to declare c as a char here, not an int. As a newbie to
Boost.Iostreams, I'm careful at spotting where char and int are expected,
and it would help to have just the right one where needed, not something
too general.
Just 0.000002⬠:)
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/10683#comment:1> 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 : 2017-02-16 18:50:17 UTC