Re: [Stlport-devel] [Stlport-cvs] SF.net SVN: stlport:[3611] trunk/STLport
Brought to you by:
complement
|
From: Ulrich E. <eck...@sa...> - 2008-07-22 07:25:32
|
On Monday 21 July 2008, =?ISO-8859-1?Q?Fran=E7ois_Dumont?= wrote:
> This is not Standard:
>
> fstream fstr("foo.txt", ios_base::app);
>
> This is Standard:
>
> fstream fstr("foo.txt", ios_base::out | ios_base::app);
>
> List of valid fstream open mode is in the table 92 at 27.8.1.2.
Okay, that's true, but IIRC ofstream (not fstream!) implies ios_base::out
being given always, so
fstream("foo", ios_base::app) is invalid but
ofstream("foo", ios_base::app) is valid because it is the same as
ofstream("foo", ios_base::app|ios_base::out).
See the description of the constructor where it explicitly states that it
calls rdbuf()->open(.., mode|out).
Uli
--
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
**************************************************************************************
Visit our website at <http://www.satorlaser.de/>
**************************************************************************************
Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empfänger sein sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder gelesen, weitergeleitet, veröffentlicht oder anderweitig benutzt werden.
E-Mails können durch Dritte gelesen werden und Viren sowie nichtautorisierte Änderungen enthalten. Sator Laser GmbH ist für diese Folgen nicht verantwortlich.
**************************************************************************************
|