Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-03-03 03:38:30

Hi Jonathan,

this is just a quick comment:

"Jonathan Turkanis" <technews_at_[hidden]> wrote in message
| Hi All,

| III. The Solution (the ugly part) ---------------------------
| The function get presents more of a challenge. Currently it looks like this
| 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
| 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> ?


Boost list run by bdawes at, gregod at, cpdaniel at, john at