Commit 85a5f64e by Paolo Carlini Committed by Paolo Carlini

std_fstream.h (class basic_ifstream, [...]): Add const overloads of is_open, as per DR 365 [WP].

2004-08-13  Paolo Carlini  <pcarlini@suse.de>

	* include/std/std_fstream.h (class basic_ifstream,
	class basic_ofstream, class basic_fstream): Add const overloads
	of is_open, as per DR 365 [WP].
	* docs/html/ext/howto.html: Add an entry for DR 365.

From-SVN: r85948
parent 1e9c8405
2004-08-13 Paolo Carlini <pcarlini@suse.de>
* include/std/std_fstream.h (class basic_ifstream,
class basic_ofstream, class basic_fstream): Add const overloads
of is_open, as per DR 365 [WP].
* docs/html/ext/howto.html: Add an entry for DR 365.
2004-08-12 Paolo Carlini <pcarlini@suse.de> 2004-08-12 Paolo Carlini <pcarlini@suse.de>
* configure.ac: Specify version 1.8.5 in AM_INIT_AUTOMAKE. * configure.ac: Specify version 1.8.5 in AM_INIT_AUTOMAKE.
......
...@@ -479,6 +479,12 @@ ...@@ -479,6 +479,12 @@
<dd>Change the format string to &quot;%.0Lf&quot;. <dd>Change the format string to &quot;%.0Lf&quot;.
</dd> </dd>
<dt><a href="lwg-defects.html#365">365</a>:
<em>Lack of const-qualification in clause 27</em>
</dt>
<dd>Add const overloads of <code>is_open</code>.
</dd>
<dt><a href="lwg-defects.html#389">389</a>: <dt><a href="lwg-defects.html#389">389</a>:
<em>Const overload of valarray::operator[] returns by value</em> <em>Const overload of valarray::operator[] returns by value</em>
</dt> </dt>
......
// File based streams -*- C++ -*- // File based streams -*- C++ -*-
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
// Free Software Foundation, Inc. // Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -282,7 +282,8 @@ namespace std ...@@ -282,7 +282,8 @@ namespace std
* @brief Returns true if the external file is open. * @brief Returns true if the external file is open.
*/ */
bool bool
is_open() const throw() { return _M_file.is_open(); } is_open() const throw()
{ return _M_file.is_open(); }
/** /**
* @brief Opens an external file. * @brief Opens an external file.
...@@ -569,7 +570,14 @@ namespace std ...@@ -569,7 +570,14 @@ namespace std
* @return @c rdbuf()->is_open() * @return @c rdbuf()->is_open()
*/ */
bool bool
is_open() { return _M_filebuf.is_open(); } is_open()
{ return _M_filebuf.is_open(); }
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 365. Lack of const-qualification in clause 27
bool
is_open() const
{ return _M_filebuf.is_open(); }
/** /**
* @brief Opens an external file. * @brief Opens an external file.
...@@ -693,7 +701,14 @@ namespace std ...@@ -693,7 +701,14 @@ namespace std
* @return @c rdbuf()->is_open() * @return @c rdbuf()->is_open()
*/ */
bool bool
is_open() { return _M_filebuf.is_open(); } is_open()
{ return _M_filebuf.is_open(); }
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 365. Lack of const-qualification in clause 27
bool
is_open() const
{ return _M_filebuf.is_open(); }
/** /**
* @brief Opens an external file. * @brief Opens an external file.
...@@ -817,7 +832,14 @@ namespace std ...@@ -817,7 +832,14 @@ namespace std
* @return @c rdbuf()->is_open() * @return @c rdbuf()->is_open()
*/ */
bool bool
is_open() { return _M_filebuf.is_open(); } is_open()
{ return _M_filebuf.is_open(); }
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 365. Lack of const-qualification in clause 27
bool
is_open() const
{ return _M_filebuf.is_open(); }
/** /**
* @brief Opens an external file. * @brief Opens an external file.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment