This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: Revised patch
- To: "Martin v. Loewis" <martin@mira.isdn.cs.tu-berlin.de>
- Subject: Re: Revised patch
- From: Benjamin Kosnik <bkoz@cygnus.com>
- Date: Fri, 16 Apr 1999 02:28:50 -0700 (PDT)
- cc: libstdc++@sourceware.cygnus.com
> Also, in <iostream>, an instance of Init is created, which should be
> std:: scoped. What I don't understand: Why is that instance created at
> all? It is not required by ISO C++, is it?
No, it is not explicitly required. What is required: cin/cout/cerr/clog
are properly initialized before other iostream objects are used. The
approach I took was to save these objects as non-static ostream/istreams
with null buffers, then switch in the correctly tied buffers with the
Init mechanism and basic_ios::rdbuf(streambuf*). So yes, it is necessary
given the current implementation.
-Benjamin
- References:
- Revised patch
- From: "Martin v. Loewis" <martin@mira.isdn.cs.tu-berlin.de>