mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-26 22:24:53 +08:00
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
This commit is contained in:
parent
50cd60be11
commit
53a381dc16
@ -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)
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user