From -2424337532979073705
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,a4a0f2ad834f7335
X-Google-Attributes: gidf78e5,public
From: Valentin Bonnard <bonnardv@pratique.fr>
Subject: Re: [io]fstreams ctors
Date: 1998/02/04
Message-ID: <34D88971.167EB0E7@pratique.fr>#1/1
X-Deja-AN: 322109718
References: <34CF78BF.5718@pratique.fr> <6aoof1$c9d$1@shell7.ba.best.com> <34D20BFB.5736@pratique.fr> <6b2f7c$uqj@marianna.psu.edu> <6b8ps5$ll5$1@shell7.ba.best.com>
X-Original-Date: Wed, 04 Feb 1998 16:29:53 +0100
Organization: Ecole Normale Superieure, Paris, France
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBVAwUBNNjY30y4NqrwXLNJAQF7mAIAw4EiyUc49y5fNDW03WHbU19kJaTHfvLY DVbGNqPQR6sY20i7gK1kbgFt07TabXtCTpXI4YBpF6BXYzY21UjpRQ== =WlA1
Newsgroups: comp.std.c++
Originator: austern@isolde.mti.sgi.com


Nathan Myers wrote:
> 
> Oleg Zabluda  <zabluda@math.psu.edu> wrote:
> >Valentin Bonnard <bonnardv@pratique.fr> wrote:
> >: Nathan Myers wrote:
> >: > It is a "permitted extension" to provide more constructors,
> >: > as long as it can't change the behavior of a conforming program.
> >
> >: class SillyConverter
> >: {
> >: public:
> >:     operator const char* ();
> >:     operator const charT* ();
> >:     operator string ();
> >: } s;
> >
> >: ifstream ifs (s);
> >
> >Hmm... It seems like your example shows that the "permitted extention",
> >Nathan refers to, is actually _never_ permitted.
> 
> It might seem that way to some people, but it doesn't seem
> that way to me.  A little thought will reveal a way to avoid
> any problems of overloading with existing constructors.

Glad to see that you are more intelligent then other people, 
Nathan. I am even MORE intelligent !            ;-)
The implementation can define a type: 

struct wchar_t_construction {};

filebuf::filebuf (const wchar_t*, wchar_t_construction);

But it would make the code completly unportable between 
implementations which support that (as they would have 
a different syntax for the same semantic: open a file).

The intent of the standard is:
(1) to standardise ?
(2) to support wchar_t ?
(3) to provide the minimum implementable on all systems ?

I think the answer is (1) and (2), not (3). How do you 
implement wcout under DOS ?

-- 

Valentin Bonnard                mailto:bonnardv@pratique.fr
info about C++/a propos du C++: http://www.pratique.fr/~bonnardv/
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your 
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu 
]



