summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/include/std/istream
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2008-02-10 15:48:10 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2008-02-10 15:48:10 +0000
commit421cae47dcec97c143d73a76d9a04fa730d84944 (patch)
tree077ed2a47177325057f56a1bd722271cc32c6e5e /libstdc++-v3/include/std/istream
parent8790974d219484fe30a982fb6fca42fef5b73f8d (diff)
downloadppe42-gcc-421cae47dcec97c143d73a76d9a04fa730d84944.tar.gz
ppe42-gcc-421cae47dcec97c143d73a76d9a04fa730d84944.zip
2008-02-10 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/16251 * include/std/istream (basic_istream<>::basic_istream()): Call this->init(). (basic_iostream<>::basic_iostream(basic_streambuf<>*)): Don't do it here, per 27.6.1.5.1/1. * include/std/ostream (basic_ostream<>::basic_ostream()): Call this->init(). * testsuite/27_io/basic_iostream/cons/16251.C: New. * testsuite/27_io/basic_iostream/cons/2020.cc: Minor tweaks. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132214 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/std/istream')
-rw-r--r--libstdc++-v3/include/std/istream24
1 files changed, 12 insertions, 12 deletions
diff --git a/libstdc++-v3/include/std/istream b/libstdc++-v3/include/std/istream
index 331e643b63f..caf670b0e35 100644
--- a/libstdc++-v3/include/std/istream
+++ b/libstdc++-v3/include/std/istream
@@ -1,7 +1,7 @@
// Input streams -*- C++ -*-
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-// 2006, 2007
+// 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -91,8 +91,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* derived classes' initialization lists, which pass a pointer to
* their own stream buffer.
*/
- explicit
- basic_istream(__streambuf_type* __sb): _M_gcount(streamsize(0))
+ explicit
+ basic_istream(__streambuf_type* __sb)
+ : _M_gcount(streamsize(0))
{ this->init(__sb); }
/**
@@ -581,8 +582,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
//@}
protected:
- explicit
- basic_istream(): _M_gcount(streamsize(0)) { }
+ basic_istream()
+ : _M_gcount(streamsize(0))
+ { this->init(0); }
template<typename _ValueT>
__istream_type&
@@ -665,7 +667,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* If the stream state is still good, then the sentry state becomes
* true ("okay").
*/
- explicit
+ explicit
sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false);
/**
@@ -788,10 +790,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* Both of the parent classes are initialized with the same
* streambuf pointer passed to this constructor.
*/
- explicit
+ explicit
basic_iostream(basic_streambuf<_CharT, _Traits>* __sb)
- : __istream_type(), __ostream_type()
- { this->init(__sb); }
+ : __istream_type(__sb), __ostream_type(__sb) { }
/**
* @brief Destructor does nothing.
@@ -800,9 +801,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
~basic_iostream() { }
protected:
- explicit
- basic_iostream() : __istream_type(), __ostream_type()
- { }
+ basic_iostream()
+ : __istream_type(), __ostream_type() { }
};
// [27.6.1.4] standard basic_istream manipulators
OpenPOWER on IntegriCloud