This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] Couple of minor tweaks


Hi,

tested x86_64-linux, committed.

Paolo.

//////////////////
2007-10-20  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/stl_move.h (_GLIBCXX_MOVE): Wrap in parentheses.
	* include/bits/stl_algobase.h (__niter_base<>): Pass iterators
	by value, as everywhere else.
Index: include/bits/stl_algobase.h
===================================================================
--- include/bits/stl_algobase.h	(revision 129492)
+++ include/bits/stl_algobase.h	(working copy)
@@ -269,16 +269,16 @@
 	   bool _BoolType = __is_normal_iterator<_Iterator>::__value>
     struct __niter_base
     {
-      static const _Iterator&
-      __b(const _Iterator& __it)
+      static _Iterator
+      __b(_Iterator __it)
       { return __it; }
     };
 
   template<typename _Iterator>
     struct __niter_base<_Iterator, true>
     {
-      static const typename _Iterator::_Iterator_type&
-      __b(const _Iterator& __it)
+      static typename _Iterator::_Iterator_type
+      __b(_Iterator __it)
       { return __it.base(); }
     };
 
Index: include/bits/stl_move.h
===================================================================
--- include/bits/stl_move.h	(revision 129491)
+++ include/bits/stl_move.h	(working copy)
@@ -64,7 +64,7 @@
 
 #define _GLIBCXX_MOVE(_Tp) std::move(_Tp)
 #else
-#define _GLIBCXX_MOVE(_Tp) _Tp
+#define _GLIBCXX_MOVE(_Tp) (_Tp)
 #endif
 
 _GLIBCXX_BEGIN_NAMESPACE(std)

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