Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-08-27 17:20:12


"Reece Dunn" <msclrhd_at_[hidden]> wrote in message:
> Jonathan Turkanis wrote:
> >"Rob Stewart" <stewart_at_[hidden]> wrote in message

> > > When parsing, it is often useful to ensure that there were
> > > exactly 10 spaces between one token and the next, for example.
> >
> >I'll take your word for it, but an example would help. I am used to just
> >worrying about whitespace.

Okay, I'm a bit embarrassed. Instead of voting to reject ios_form, multi_newer
and multi_skipper I should have justed asked for a better rationale.

You and Rob have convinced me that all Daryle's manipulators (with possible
exception of ios_form) should be accepted. Here's a summary of the names and
extensions I'd like to see:

- multi_skipper, etc. I'd like these usages to be supported:

    cin >> skip_line >> ... // skip a line
    cin >> skip_lines(12) >> .. // skip 12 lines
    cin >> skip('c', 3) >> ... // skip 3 c's
    cin >> skip("hello world!") >> .. // skip given sequence
    cin >> skip_if(isalpha) // skip alphabetic characters
    cin >> skip_to(isalpha) // skip non-alphabetic characters

- multi_newer, etc.

    cout << newline << ... // write a newline without flushing
    cout << newlines(7) << ... // write 7 newlines
    cout << repeat('c', 3) << ... // write 3 c's

- ios_form, if it does what Rob described, it sounds okay. I'd like to see an
explanation from Daryle, though. I have no idea what the name should be.

Best Regards,
Jonathan


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