Boost logo

Boost :

From: Dave Steffen (steffend_at_[hidden])
Date: 2000-03-06 16:04:06


Greg Colvin writes:
> > Dave Abrahams writes:
> > [...]
> >
> > Personally, I've got a header file that has a bunch of nifty stream
> > stuff; the first line is something like
> >
> > const char nl='\n';
> >
> > which I then use thusly:
> >
> > cout << "First line" << nl << "Second line" << nl;
>
> Just to save two keystrokes? Well, four total in this line.

 Well, it's not just the keystrokes. I didn't mind typing "endl", but
 wanted to avoid gratuitously flushing the buffer. And I find that
 "nl" is a lot easier to type than "'\n'", my fingers don't have to
 leave the home keys and all that. ;-)

 BTW this is one of the less important things we should think about
 fixing/tweaking in the streams library... I'm much more interested in
 some of the proposals for formatting.

 We also need to have [i|o]fstreams that take the file names in
 strings and not char*'s.

 I've also been sneaking up on the notion that the distinction between
 strings and stringstreams is rather small, and maybe we should merge
 the two classes; but right now this notion is half-baked at best.

--------------------------------------------------------------------------
Dave Steffen Wave after wave will flow with the tide
Dept. of Physics And bury the world as it does
Colorado State University Tide after tide will flow and recede
steffend_at_[hidden] Leaving life to go on as it was...
                                                        - Peart / RUSH
"The reason that our people suffer in this way....
is that our ancestors failed to rule wisely". -General Choi, Hong Hi


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