patch - implement stdio_fstream
Gabriel Dos Reis
gdr@integrable-solutions.net
Fri Feb 20 09:52:00 GMT 2004
Jonathan Wakely <cow@compsoc.man.ac.uk> writes:
| On Thu, Feb 19, 2004 at 09:11:06PM -0500, Robert Schweikert wrote:
|
| > Here is a patch implementing stdio_fstream, and extension that is
| > usefull for applications requiring legacy APIs or applications wanting
| > to attach a stream to a pipe or an open file.
| >
| > I am still waiting for the copyright assignment paper work but thought
| > I'd post the patch to allow people to comment or let me if I need to
| > make any corrections.
|
| How about making this ctor take a std::string ?
|
| stdio_ifstream(const char* __s,
| std::ios_base::openmode __mode = std::ios_base::in)
|
| I know there are good reasons not to do this for std::fstream, but this
| class is an extension anyway.
I suggest overload for both forms. The "const char*" version for
similarity with other file-stream constructors and the natural
"const string&" version to remove the pain for the sneaky .c_str()
construct.
| Thoughts?
|
| Similarly, any plans to resurrect Phil's patch to make fstream take
| std::string, or is that being permanently dropped as a non-standard
| extension? c.f. http://gcc.gnu.org/ml/libstdc++/2001-06/msg00008.html
I think these issues will be discussed in the revision of the
standard library.
-- Gaby
More information about the Libstdc++
mailing list