Opened 8 years ago

Last modified 8 years ago

#10683 new Bugs

Boost.Iostreams: typos in the doc

Reported by: akim demaille <akim@…> Owned by: Jonathan Turkanis
Milestone: To Be Determined Component: iostreams
Version: Boost 1.56.0 Severity: Cosmetic
Keywords: Cc:

Description

http://www.boost.org/doc/libs/1_56_0/libs/iostreams/doc/tutorial/shell_comments_filters.html reads

"unix2dos_stdio_filter can be used in place of shell_comments_input_filter and shell_comments_output_filter"

It should read (first id is changed):

"shell_comments_stdio_filter can be used in place of shell_comments_input_filter and shell_comments_output_filter"

Change History (1)

comment:1 by akim demaille <akim@…>, 8 years ago

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€ :)

Note: See TracTickets for help on using tickets.