
Hi Jonathan, this is just a quick comment: "Jonathan Turkanis" <technews@kangaroologic.com> wrote in message news:d062af$h9l$1@sea.gmane.org... | Hi All, | III. The Solution (the ugly part) --------------------------- | | The function get presents more of a challenge. Currently it looks like this (for | char_type == char): | | struct my_input_filter : input_filter { | template<typename Source> | int get(Source& src); | }; | | The return type already serves a dual purpose: it can store a character or an | EOF indication. Unfortunately, with non-blocking or async i/o there are now | three possible results of a call to get: | | 1. A character is successfully retrieved. | 2. The end of the stream has been reached. | 3. No characters are currently available, but more may be available later. isn't this a job for boost::optional<int> ? -Thorsten