Commit Graph

2 Commits

Author SHA1 Message Date
asynts
6de63782c7 Streams: Consistent behaviour when reading from stream with error.
The streaming operator doesn't short-circuit, consider the following
snippet:

    void foo(InputStream& stream) {
        int a, b;
        stream >> a >> b;
    }

If the first read fails, the second is called regardless. It should be
well defined what happens in this case: nothing.
2020-09-06 12:54:45 +02:00
asynts
359fcf348f AK: Add Buffered<T> which wraps a stream, adding input buffering. 2020-09-06 12:54:45 +02:00