summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/bits
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2013-02-08 15:26:55 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2013-02-08 15:26:55 +0000
commit2fffb07a72d0755a559b08cfa30eb12d277daec1 (patch)
tree20d56621348a3b110462868858912c7fa9c996f0 /libstdc++-v3/include/bits
parent00d899d593b3ee0b57d64166bcbdb2c34bc40f0d (diff)
downloadgcc-2fffb07a72d0755a559b08cfa30eb12d277daec1.tar.gz
2013-02-08 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 195888 using svnmerge.py git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@195892 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/bits')
-rw-r--r--libstdc++-v3/include/bits/basic_ios.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libstdc++-v3/include/bits/basic_ios.h b/libstdc++-v3/include/bits/basic_ios.h
index b78b464ba02..bda40f0a7a3 100644
--- a/libstdc++-v3/include/bits/basic_ios.h
+++ b/libstdc++-v3/include/bits/basic_ios.h
@@ -112,8 +112,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* This allows you to write constructs such as
* <code>if (!a_stream) ...</code> and <code>while (a_stream) ...</code>
*/
+#if __cplusplus >= 201103L
+ explicit operator bool() const
+ { return !this->fail(); }
+#else
operator void*() const
{ return this->fail() ? 0 : const_cast<basic_ios*>(this); }
+#endif
bool
operator!() const