Commit a8090052 by Paolo Carlini Committed by Paolo Carlini

stl_algo.h (__rotate<_RandomAccessIterator>): Don't qualify __tmp as const,…

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
parent 527abb7a
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> 2005-05-19 Richard Henderson <rth@redhat.com>
* libsupc++/unwind-cxx.h: Revert gcc_unreachable change. * libsupc++/unwind-cxx.h: Revert gcc_unreachable change.
......
// Algorithm implementation -*- C++ -*- // 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 // 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 // software; you can redistribute it and/or modify it under the
...@@ -1637,7 +1637,7 @@ namespace std ...@@ -1637,7 +1637,7 @@ namespace std
for (_Distance __i = 0; __i < __d; __i++) for (_Distance __i = 0; __i < __d; __i++)
{ {
const _ValueType __tmp = *__first; _ValueType __tmp = *__first;
_RandomAccessIterator __p = __first; _RandomAccessIterator __p = __first;
if (__k < __l) if (__k < __l)
......
...@@ -94,7 +94,7 @@ namespace std ...@@ -94,7 +94,7 @@ namespace std
// concept requirements // concept requirements
__glibcxx_function_requires(_SGIAssignableConcept<_Tp>) __glibcxx_function_requires(_SGIAssignableConcept<_Tp>)
const _Tp __tmp = __a; _Tp __tmp = __a;
__a = __b; __a = __b;
__b = __tmp; __b = __tmp;
} }
...@@ -111,7 +111,7 @@ namespace std ...@@ -111,7 +111,7 @@ namespace std
{ {
typedef typename iterator_traits<_ForwardIterator1>::value_type typedef typename iterator_traits<_ForwardIterator1>::value_type
_ValueType1; _ValueType1;
const _ValueType1 __tmp = *__a; _ValueType1 __tmp = *__a;
*__a = *__b; *__a = *__b;
*__b = __tmp; *__b = __tmp;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment