diff options
author | Paolo Carlini <pcarlini@suse.de> | 2005-05-20 08:58:23 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2005-05-20 08:58:23 +0000 |
commit | a809005264c4eb6afb51d39621e582c505a4c590 (patch) | |
tree | 6153ea2a2e607dc4a68f4a54675af19eb982cccf | |
parent | 527abb7a71bed0c01e6be5ef0cd79291c9f081a3 (diff) | |
download | gcc-a809005264c4eb6afb51d39621e582c505a4c590.tar.gz |
stl_algo.h (__rotate<_RandomAccessIterator>): Don't qualify __tmp as const, _ValueType is not necessarily Assignable.
2005-05-20 Paolo Carlini <pcarlini@suse.de>
* include/bits/stl_algo.h (__rotate<_RandomAccessIterator>):
Don't qualify __tmp as const, _ValueType is not necessarily
Assignable.
* include/bits/stl_algobase.h (swap, __iter_swap<false>):
Likewise, as an harmless extension.
From-SVN: r100011
-rw-r--r-- | libstdc++-v3/ChangeLog | 8 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/stl_algo.h | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/stl_algobase.h | 4 |
3 files changed, 12 insertions, 4 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 888dfed3151..efde72f2bd5 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,11 @@ +2005-05-20 Paolo Carlini <pcarlini@suse.de> + + * include/bits/stl_algo.h (__rotate<_RandomAccessIterator>): + Don't qualify __tmp as const, _ValueType is not necessarily + Assignable. + * include/bits/stl_algobase.h (swap, __iter_swap<false>): + Likewise, as an harmless extension. + 2005-05-19 Richard Henderson <rth@redhat.com> * libsupc++/unwind-cxx.h: Revert gcc_unreachable change. diff --git a/libstdc++-v3/include/bits/stl_algo.h b/libstdc++-v3/include/bits/stl_algo.h index c0eaf5cd516..7647ba342f8 100644 --- a/libstdc++-v3/include/bits/stl_algo.h +++ b/libstdc++-v3/include/bits/stl_algo.h @@ -1,6 +1,6 @@ // Algorithm implementation -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -1637,7 +1637,7 @@ namespace std for (_Distance __i = 0; __i < __d; __i++) { - const _ValueType __tmp = *__first; + _ValueType __tmp = *__first; _RandomAccessIterator __p = __first; if (__k < __l) diff --git a/libstdc++-v3/include/bits/stl_algobase.h b/libstdc++-v3/include/bits/stl_algobase.h index 426fcba0298..a0f7c5041c3 100644 --- a/libstdc++-v3/include/bits/stl_algobase.h +++ b/libstdc++-v3/include/bits/stl_algobase.h @@ -94,7 +94,7 @@ namespace std // concept requirements __glibcxx_function_requires(_SGIAssignableConcept<_Tp>) - const _Tp __tmp = __a; + _Tp __tmp = __a; __a = __b; __b = __tmp; } @@ -111,7 +111,7 @@ namespace std { typedef typename iterator_traits<_ForwardIterator1>::value_type _ValueType1; - const _ValueType1 __tmp = *__a; + _ValueType1 __tmp = *__a; *__a = *__b; *__b = __tmp; } |