Opened 7 years ago

Last modified 6 years ago

#11752 new Bugs

basic_null_device::read returns 0 but -1 is expected

Reported by: Nikolay Shelukhin <nikola-sh@…> Owned by: Jonathan Turkanis
Milestone: To Be Determined Component: iostreams
Version: Boost 1.59.0 Severity: Problem
Keywords: Cc:

Description

Documentation:

basic_null_device::read
"Returns -1. Enabled if Mode refines input."

Code:

template<typename Ch, typename Mode>
class basic_null_device {
public:
    ...
    std::streamsize read(Ch*, std::streamsize) { return 0; }
    ...

Change History (1)

comment:1 by Edward Diener, 6 years ago

This has been fixed in the current 'develop' branch.

Note: See TracTickets for help on using tickets.