diff options
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)); } //@} |