Boost logo

Boost :

From: Jonathan Graehl (jonathan_at_[hidden])
Date: 2004-09-07 14:08:59


For basic_newline_filter (great idea; I hadn't even realized Macintosh
had yet ANOTHER newline convention), it would be nice to be able to get
the current line number and possibly even the character number on that
line, for reporting errors in input. I realize this should be possible
as a separate filter counting '\n' and non-'\n' characters, which
handles the output of basic_newline_filter, but I don't think the cost
of maintaining one or two counters would be too much a burden for those
who don't need it (or if it is, provide versions with and without).

Even nicer would be a call that extracts up to the previous N already
consumed characters, for even more helpful context (I have already made
a practice of showing the next N characters to be read in case of a
fatal error, when the input is a file and not interactive). Obviously
this could be a filter in its own right, and really has nothing to do
with basic_newline_filter.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk