This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[v3] Minor changes


Hi,

tested x86_64-linux, committed to mainline.

Paolo.

////////////////////
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.
Index: include/std/istream
===================================================================
--- include/std/istream	(revision 150382)
+++ include/std/istream	(working copy)
@@ -840,12 +840,9 @@
    *  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
Index: include/std/ostream
===================================================================
--- include/std/ostream	(revision 150382)
+++ include/std/ostream	(working copy)
@@ -575,12 +575,9 @@
    *  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
Index: include/bits/move.h
===================================================================
--- include/bits/move.h	(revision 150382)
+++ include/bits/move.h	(working copy)
@@ -48,28 +48,27 @@
 
   /// 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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]