Re: [boost] Report from Berlin C++ Standards Committee meeting

David Abrahams wrote:
"Peter Dimov" <pdimov@mmltd.net> writes:
David Abrahams wrote:
Jeff Garland <jeff@crystalclearsoftware.com> writes:
Sounds good. I am worried that even with the iostream integration the proposal won't have Doug's one-line wget implementation, but we'll see.
Fortunately, Doug wrote "one slide," not "one line."
std::ifstream is( "http://www.example.com/file.zip" ); std::ofstream os( "file.zip" ); os << is.rdbuf();
No proposal required, in principle.
Except that any code involving an identifier spelled "rdbuf" fails the "do the obvious thing in an obvious way" test.
If the standard had an output operator for an input stream, so that line would be: os << is; :) (This would be equivalent to using is.rdbuf(), hiding that away from the user who isn't familiar with stream buffers and stream implementation details.) - Reece _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
participants (1)
-
Reece Dunn