diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-07 16:58:43 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-07 16:58:43 +0000 |
commit | 4823b3a77343508cb90960a6b920d7b7c0d4a02b (patch) | |
tree | 3e24f4d2bc47123bfe232405f1429986a7a805e3 /libstdc++-v3/include | |
parent | 2dfcb59597a2fc564033f2c0c988a08e13b16624 (diff) | |
download | gcc-4823b3a77343508cb90960a6b920d7b7c0d4a02b.tar.gz |
2005-03-07 Paolo Carlini <pcarlini@suse.de>
* include/std/std_fstream.h (basic_fstream<>::open,
basic_ifstream<>::open, basic_ofstream<>::open): Implement the
resolution of DR 409 [Ready], call clear() on success.
* docs/html/ext/howto.html: Add an entry for DR 409.
* docs/html/faq/index.html (4_4): Clarify the new behavior.
* testsuite/27_io/basic_ifstream/open/char/1.cc: Adjust.
* testsuite/27_io/basic_ofstream/open/char/1.cc: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96030 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r-- | libstdc++-v3/include/std/std_fstream.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libstdc++-v3/include/std/std_fstream.h b/libstdc++-v3/include/std/std_fstream.h index ed119d4c8ea..fb042ae2fec 100644 --- a/libstdc++-v3/include/std/std_fstream.h +++ b/libstdc++-v3/include/std/std_fstream.h @@ -496,6 +496,10 @@ namespace std { if (!_M_filebuf.open(__s, __mode | ios_base::in)) this->setstate(ios_base::failbit); + else + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 409. Closing an fstream should clear error state + this->clear(); } /** @@ -623,6 +627,10 @@ namespace std { if (!_M_filebuf.open(__s, __mode | ios_base::out)) this->setstate(ios_base::failbit); + else + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 409. Closing an fstream should clear error state + this->clear(); } /** @@ -749,6 +757,10 @@ namespace std { if (!_M_filebuf.open(__s, __mode)) this->setstate(ios_base::failbit); + else + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 409. Closing an fstream should clear error state + this->clear(); } /** |