Commit 53a381dc by Paolo Carlini Committed by Paolo Carlini

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
parent 50cd60be
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment