This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[v3] Couple of minor tweaks
- From: Paolo Carlini <pcarlini at suse dot de>
- To: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 20 Oct 2007 12:09:26 +0200
- Subject: [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)