diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-10-13 22:46:58 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-10-13 22:46:58 +0000 |
commit | a09397becb831d2bae41fbea3d9a4ff260b836d6 (patch) | |
tree | 7a5ebbbba647ee21f587ad70018c5accb76f8a03 /libstdc++-v3/include/std/std_istream.h | |
parent | 4b4162841e95ae97480040d7b98fb7f325e2d184 (diff) | |
download | ppe42-gcc-a09397becb831d2bae41fbea3d9a4ff260b836d6.tar.gz ppe42-gcc-a09397becb831d2bae41fbea3d9a4ff260b836d6.zip |
2006-10-13 Paolo Carlini <pcarlini@suse.de>
* include/bits/istream.tcc (operator>>(__istream_type&
(*)(__istream_type&)), operator>>(__ios_type& (*)(__ios_type&)),
operator>>(ios_base& (*)(ios_base&))): Move...
* include/std/std_istream.h: ... here.
(operator>>(basic_istream<char,>&, unsigned char&),
operator>>(basic_istream<char,>&, signed char&),
operator>>(basic_istream<char,>&, unsigned char*),
operator>>(basic_istream<char,>&, signed char*)): Mark inline.
* include/bits/ostream.tcc (operator<<(__ostream_type&
(*)(__ostream_type&)), operator<<(__ios_type& (*)(__ios_type&)),
operator<<(ios_base& (*)(ios_base&))): Move...
* include/std/std_ostream.h: ... here.
(operator<<(basic_ostream<>&, _CharT),
operator<<(basic_ostream<>&, char),
operator<<(basic_ostream<char,>&, char),
operator<<(basic_ostream<char,>&, signed char),
operator<<(basic_ostream<char,>&, unsigned char),
operator<<(basic_ostream<>&, const _CharT*),
operator<<(basic_ostream<char,>&, const char*),
operator<<(basic_ostream<char,>&, const signed char*),
operator<<(basic_ostream<char,>&, const unsigned char*),
endl(basic_ostream<>&), ends(basic_ostream<>&),
flush(basic_ostream<>&)): Mark inline.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117715 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/std/std_istream.h')
-rw-r--r-- | libstdc++-v3/include/std/std_istream.h | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/libstdc++-v3/include/std/std_istream.h b/libstdc++-v3/include/std/std_istream.h index 862793e9ffe..e81c9cd9252 100644 --- a/libstdc++-v3/include/std/std_istream.h +++ b/libstdc++-v3/include/std/std_istream.h @@ -127,14 +127,23 @@ _GLIBCXX_BEGIN_NAMESPACE(std) * functions in constructs like "std::cin >> std::ws". For more * information, see the iomanip header. */ - inline __istream_type& - operator>>(__istream_type& (*__pf)(__istream_type&)); + __istream_type& + operator>>(__istream_type& (*__pf)(__istream_type&)) + { return __pf(*this); } - inline __istream_type& - operator>>(__ios_type& (*__pf)(__ios_type&)); + __istream_type& + operator>>(__ios_type& (*__pf)(__ios_type&)) + { + __pf(*this); + return *this; + } - inline __istream_type& - operator>>(ios_base& (*__pf)(ios_base&)); + __istream_type& + operator>>(ios_base& (*__pf)(ios_base&)) + { + __pf(*this); + return *this; + } //@} // [27.6.1.2.2] arithmetic extractors @@ -247,7 +256,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) * @return The number of characters extracted by the previous * unformatted input function dispatched for this stream. */ - inline streamsize + streamsize gcount() const { return _M_gcount; } @@ -331,7 +340,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) * * Returns @c get(s,n,widen('\n')). */ - inline __istream_type& + __istream_type& get(char_type* __s, streamsize __n) { return this->get(__s, __n, this->widen('\n')); } @@ -364,7 +373,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) * * Returns @c get(sb,widen('\n')). */ - inline __istream_type& + __istream_type& get(__streambuf_type& __sb) { return this->get(__sb, this->widen('\n')); } @@ -404,7 +413,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) * * Returns @c getline(s,n,widen('\n')). */ - inline __istream_type& + __istream_type& getline(char_type* __s, streamsize __n) { return this->getline(__s, __n, this->widen('\n')); } @@ -675,7 +684,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) * For ease of use, sentries may be converted to booleans. The * return value is that of the sentry state (true == okay). */ - operator bool() const { return _M_ok; } + operator bool() const + { return _M_ok; } private: bool _M_ok; @@ -699,12 +709,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c); template<class _Traits> - basic_istream<char, _Traits>& + inline basic_istream<char, _Traits>& operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) { return (__in >> reinterpret_cast<char&>(__c)); } template<class _Traits> - basic_istream<char, _Traits>& + inline basic_istream<char, _Traits>& operator>>(basic_istream<char, _Traits>& __in, signed char& __c) { return (__in >> reinterpret_cast<char&>(__c)); } //@} @@ -745,12 +755,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) operator>>(basic_istream<char>& __in, char* __s); template<class _Traits> - basic_istream<char, _Traits>& + inline basic_istream<char, _Traits>& operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) { return (__in >> reinterpret_cast<char*>(__s)); } template<class _Traits> - basic_istream<char, _Traits>& + inline basic_istream<char, _Traits>& operator>>(basic_istream<char, _Traits>& __in, signed char* __s) { return (__in >> reinterpret_cast<char*>(__s)); } //@} |