summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2007-10-20 10:08:29 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2007-10-20 10:08:29 +0000
commit8df6486d38d2c05a054a2fb9db143b2409af5c35 (patch)
tree9f2e176c5b1aba9ea30091242e5df51a5104f28c
parente9ddda8e712a996497dc4cd4f72af5bf52f48b91 (diff)
downloadppe42-gcc-8df6486d38d2c05a054a2fb9db143b2409af5c35.tar.gz
ppe42-gcc-8df6486d38d2c05a054a2fb9db143b2409af5c35.zip
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129509 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libstdc++-v3/ChangeLog6
-rw-r--r--libstdc++-v3/include/bits/stl_algobase.h8
-rw-r--r--libstdc++-v3/include/bits/stl_move.h2
3 files changed, 11 insertions, 5 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index c839f27efed..e7d18fdd4b4 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,11 @@
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.
+
+2007-10-20 Paolo Carlini <pcarlini@suse.de>
+
* include/tr1_impl/random
(uniform_int<>::_M_call(_UniformRandomNumberGenerator&, result_type,
result_type, true_type)): Fix small thinko.
diff --git a/libstdc++-v3/include/bits/stl_algobase.h b/libstdc++-v3/include/bits/stl_algobase.h
index 6a6e2e03bd4..75bf7e07f9b 100644
--- a/libstdc++-v3/include/bits/stl_algobase.h
+++ b/libstdc++-v3/include/bits/stl_algobase.h
@@ -269,16 +269,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
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(); }
};
diff --git a/libstdc++-v3/include/bits/stl_move.h b/libstdc++-v3/include/bits/stl_move.h
index f8e10620a0d..ab5b494f1b9 100644
--- a/libstdc++-v3/include/bits/stl_move.h
+++ b/libstdc++-v3/include/bits/stl_move.h
@@ -64,7 +64,7 @@ _GLIBCXX_END_NAMESPACE
#define _GLIBCXX_MOVE(_Tp) std::move(_Tp)
#else
-#define _GLIBCXX_MOVE(_Tp) _Tp
+#define _GLIBCXX_MOVE(_Tp) (_Tp)
#endif
_GLIBCXX_BEGIN_NAMESPACE(std)
OpenPOWER on IntegriCloud