Opened 12 years ago

Closed 12 years ago

#507 closed request (fixed)

getline input iterator

Reported by: Peter Owned by: Peter
Priority: major Milestone: yat 0.6
Component: utility Version: trunk
Keywords: Cc:

Description

Standard provides istream_iterator that uses operator>> to read from istream. It would be useful to have similar but using std::getline to read.

Possibly we should allow other types than string (i.e. templatize), in which case we need to decide how to deal with empty string (NaN??). Function utility::convert otherwise seems applicable.

Change History (3)

comment:1 Changed 12 years ago by Peter

Milestone: yat 0.x+yat 0.6
Status: newassigned

comment:2 Changed 12 years ago by Peter

I've decided to support only string. Support, for example, for double would have been implemented in a two-stage rocket, first reading istream to string and then converting to a double. As a rule of one module does one thing it better to let this iterator read from istream to string and leave the second rocket for other class.

comment:3 Changed 12 years ago by Peter

Resolution: fixed
Status: assignedclosed

(In [1878]) Adding a GetlineIterator?. closes #507

Note: See TracTickets for help on using tickets.