|
Boost : |
From: Daryle Walker (darylew_at_[hidden])
Date: 2002-01-03 00:20:34
on 1/1/02 9:32 PM, Jens Maurer at Jens.Maurer_at_[hidden] wrote:
> [I] wrote:
>>
>> It's at:
>>
>> http://groups.yahoo.com/group/boost/files/iostate.zip
>>
>> It is just a bunch of state-saving classes for I/O streams. The
>> latest version moves the classes to the boost::io namespace.
>
> This appears to be reasonable, since we may have a bunch of other
> I/O stuff soon.
You mean the stuff like "format," right? I have some I/O stuff to add too.
A lot of it is stuff from more_io.zip in bite-size, easier to review,
pieces. I picked these classes first since they are not dependent on the
other parts of More-I/O, are simple, and can be used in the implementation
of later I/O stuff (mine and others).
> I think the classes are useful; I've often had the need to
> temporarily switch the precision (or the fmtflags) and restore
> the old value afterwards. Often, I don't do it in an
> exception-safe way out of lazyness. These classes help me
> here.
>
> I've had a quick look at the implementation. I'd really
> like to see these macros go away. I believe they can be
> replaced by templates that take (among other things)
> member function pointers as value parameters.
Aren't there quite a few compilers that can't grok member function pointers
as value-based template parameters?
> I'd like to see this investigated.
The implementations are basic, yet repetitious. Using templates means
possibly moving stuff to the run-time domain, losing time and space. The
total size isn't that large, so I don't know if using better methods are
worth it.
-- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk