This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: patch - implement stdio_fstream


Sounds good to me. I'll add the new ctor and resubmit the patch.

Robert

On Fri, 2004-02-20 at 04:42, Gabriel Dos Reis wrote:
> 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
-- 
Robert Schweikert <rjschwei@cox.net>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]