http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59687

Christopher Yeleighton <giecrilj at stegny dot 2a.pl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|FIXED                       |---

--- Comment #4 from Christopher Yeleighton <giecrilj at stegny dot 2a.pl> ---
(In reply to Jonathan Wakely from comment #2)
> Author: redi
> Date: Fri Jan 10 14:30:27 2014
> New Revision: 206525
>     trunk/libstdc++-v3/doc/xml/manual/backwards_compatibility.xml

You:

Because iostream modes correspond
to <function>fopen(3)</function> modes these flags are not supported.

Me:

The implication is 1⇒1, so this is formally valid.  But correlation is not
causation; in this case, you have (fopen (path, "wx")) both implemented in GNU
and standardised.  So your statement is misleading, at least for (noreplace).

You:

If you need
to check for existence and open a file as a single operation then you will
need to use OS-specific facilities outside the C++ standard library, such
as <function>open(2)</function>

Me:

Maybe it would be worth mentioning how you can construct a stream from a file
descriptor so as to avoid a resource leak (the constructor must not throw for
this scheme to work).  

It seems (noreplace) is more important in practice than (nocreate).  Now that
it is standardised, could you consider providing (__noreplace) instead?

See also <URL:
https://groups.google.com/a/isocpp.org/d/msg/std-proposals/I5z9QIo7KHU/D3eC_NRlMjMJ
>

Meta:

I admit the bug is sort-of fixed but still I tentatively reopen to see if you
would reconsider the text given the remarks above.  Please forgive me if it is
too much disruption for you.

Reply via email to