diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2009-08-03 21:53:25 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2009-08-03 21:53:25 +0000 |
commit | 53a381dc16995e7afd228b14785db65f7d8e02a4 (patch) | |
tree | 0645e9d853077503cef27b693ec96f023c356789 /libstdc++-v3 | |
parent | 50cd60be11a52f6ee997d331f83c5b62ee59f448 (diff) | |
download | gcc-53a381dc16995e7afd228b14785db65f7d8e02a4.tar.gz |
istream (operator>>(basic_istream<>&&, _Tp&)): Minor cosmetic changes, inline.
2009-08-03 Paolo Carlini <paolo.carlini@oracle.com>
* include/std/istream (operator>>(basic_istream<>&&, _Tp&)): Minor
cosmetic changes, inline.
* include/std/ostream (operator<<(basic_ostream<>&&, const _Tp&)):
Likewise.
* include/bits/move.h: Minor cosmetic changes.
From-SVN: r150387
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 8 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/move.h | 11 | ||||
-rw-r--r-- | libstdc++-v3/include/std/istream | 9 | ||||
-rw-r--r-- | libstdc++-v3/include/std/ostream | 9 |
4 files changed, 19 insertions, 18 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 4a4c4d6a835..e3700983cc3 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,11 @@ +2009-08-03 Paolo Carlini <paolo.carlini@oracle.com> + + * include/std/istream (operator>>(basic_istream<>&&, _Tp&)): Minor + cosmetic changes, inline. + * include/std/ostream (operator<<(basic_ostream<>&&, const _Tp&)): + Likewise. + * include/bits/move.h: Minor cosmetic changes. + 2009-08-02 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/40912 (final) diff --git a/libstdc++-v3/include/bits/move.h b/libstdc++-v3/include/bits/move.h index d1da1e40ddf..e52dec81bc7 100644 --- a/libstdc++-v3/include/bits/move.h +++ b/libstdc++-v3/include/bits/move.h @@ -48,28 +48,27 @@ _GLIBCXX_BEGIN_NAMESPACE(std) /// forward (as per N2835) /// Forward lvalues as rvalues. - template <class _Tp> + template<typename _Tp> inline typename enable_if<!is_lvalue_reference<_Tp>::value, _Tp&&>::type forward(typename std::identity<_Tp>::type& __t) { return static_cast<_Tp&&>(__t); } /// Forward rvalues as rvalues. - template <class _Tp> + template<typename _Tp> inline typename enable_if<!is_lvalue_reference<_Tp>::value, _Tp&&>::type forward(typename std::identity<_Tp>::type&& __t) { return static_cast<_Tp&&>(__t); } // Forward lvalues as lvalues. - template <class _Tp> + template<typename _Tp> inline typename enable_if<is_lvalue_reference<_Tp>::value, _Tp>::type forward(typename std::identity<_Tp>::type __t) { return __t; } // Prevent forwarding rvalues as const lvalues. - template <class _Tp> + template<typename _Tp> inline typename enable_if<is_lvalue_reference<_Tp>::value, _Tp>::type - forward(typename std::remove_reference<_Tp>::type&& __t) - = delete; + forward(typename std::remove_reference<_Tp>::type&& __t) = delete; /** * @brief Move a value. diff --git a/libstdc++-v3/include/std/istream b/libstdc++-v3/include/std/istream index f20b8962539..2d47b0fd842 100644 --- a/libstdc++-v3/include/std/istream +++ b/libstdc++-v3/include/std/istream @@ -840,12 +840,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) * that take an lvalue reference. */ template<typename _CharT, typename _Traits, typename _Tp> - basic_istream<_CharT, _Traits>& - operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x) - { - __is >> __x; - return __is; - } + inline basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x) + { return (__is >> __x); } #endif // __GXX_EXPERIMENTAL_CXX0X__ _GLIBCXX_END_NAMESPACE diff --git a/libstdc++-v3/include/std/ostream b/libstdc++-v3/include/std/ostream index 136c3d62fba..9fc693cb3c3 100644 --- a/libstdc++-v3/include/std/ostream +++ b/libstdc++-v3/include/std/ostream @@ -575,12 +575,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) * that take an lvalue reference. */ template<typename _CharT, typename _Traits, typename _Tp> - basic_ostream<_CharT, _Traits>& - operator<<(basic_ostream<_CharT, _Traits>&& __os, const _Tp& __x) - { - __os << __x; - return __os; - } + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>&& __os, const _Tp& __x) + { return (__os << __x); } #endif // __GXX_EXPERIMENTAL_CXX0X__ _GLIBCXX_END_NAMESPACE |