You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by se...@apache.org on 2005/12/08 20:10:36 UTC
svn commit: r355172 - in /incubator/stdcxx/trunk/include: numeric
rw/_algobase.h vector
Author: sebor
Date: Thu Dec 8 11:10:29 2005
New Revision: 355172
URL: http://svn.apache.org/viewcvs?rev=355172&view=rev
Log:
2005-12-08 Martin Sebor <se...@roguewave.com>
STDCXX-86
* numeric (__adjacent_difference): Renamed __value to __val in order
to avoid MSVC 8.0 error C4980: '__value': use of this keyword requires
/clr:oldSyntax command line option.
* _algobase.h (fill, fill_n): Ditto.
* vector (_C_fill): Ditto. While there, also replaced const references
to bool in function arguments with ordinary values.
Modified:
incubator/stdcxx/trunk/include/numeric
incubator/stdcxx/trunk/include/rw/_algobase.h
incubator/stdcxx/trunk/include/vector
Modified: incubator/stdcxx/trunk/include/numeric
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/include/numeric?rev=355172&r1=355171&r2=355172&view=diff
==============================================================================
--- incubator/stdcxx/trunk/include/numeric (original)
+++ incubator/stdcxx/trunk/include/numeric Thu Dec 8 11:10:29 2005
@@ -3,7 +3,7 @@
*
* numeric - Declarations for the Standard Library algorithms
*
- * $Id: //stdlib/dev/include/numeric#18 $
+ * $Id$
*
***************************************************************************
*
@@ -93,10 +93,10 @@
__partial_sum (_InputIter __first, _InputIter __last, _OutputIter __res,
_TypeT*)
{
- _TypeT __value = *__first;
+ _TypeT __val = *__first;
while (++__first != __last) {
- __value = __value + *__first;
- *++__res = __value;
+ __val = __val + *__first;
+ *++__res = __val;
}
return ++__res;
}
@@ -120,10 +120,10 @@
_OutputIter __res, _TypeT*,
_BinaryOperation __oper)
{
- _TypeT __value = *__first;
+ _TypeT __val = *__first;
while (++__first != __last) {
- __value = __oper(__value, *__first);
- *++__res = __value;
+ __val = __oper (__val, *__first);
+ *++__res = __val;
}
return ++__res;
}
@@ -145,11 +145,11 @@
__adjacent_difference (_InputIter __first, _InputIter __last, _OutputIter __res,
_TypeT*)
{
- _TypeT __value = *__first;
+ _TypeT __val = *__first;
while (++__first != __last) {
_TypeT __tmp = *__first;
- *++__res = __tmp - __value;
- __value = __tmp;
+ *++__res = __tmp - __val;
+ __val = __tmp;
}
return ++__res;
}
@@ -173,11 +173,11 @@
__adjacent_difference (_InputIter __first, _InputIter __last,
_OutputIter __res, _TypeT*, _BinaryOperation __oper)
{
- _TypeT __value = *__first;
+ _TypeT __val = *__first;
while (++__first != __last) {
_TypeT __tmp = *__first;
- *++__res = __oper(__tmp, __value);
- __value = __tmp;
+ *++__res = __oper (__tmp, __val);
+ __val = __tmp;
}
return ++__res;
}
Modified: incubator/stdcxx/trunk/include/rw/_algobase.h
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/include/rw/_algobase.h?rev=355172&r1=355171&r2=355172&view=diff
==============================================================================
--- incubator/stdcxx/trunk/include/rw/_algobase.h (original)
+++ incubator/stdcxx/trunk/include/rw/_algobase.h Thu Dec 8 11:10:29 2005
@@ -105,12 +105,12 @@
// 25.2.5
template <class _FwdIter, class _TypeT>
-inline void fill (_FwdIter __first, _FwdIter __last, const _TypeT& __value)
+inline void fill (_FwdIter __first, _FwdIter __last, const _TypeT &__val)
{
_RWSTD_ASSERT_RANGE (__first, __last);
for ( ; !(__first == __last); ++__first)
- *__first = __value;
+ *__first = __val;
}
Modified: incubator/stdcxx/trunk/include/vector
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/include/vector?rev=355172&r1=355171&r2=355172&view=diff
==============================================================================
--- incubator/stdcxx/trunk/include/vector (original)
+++ incubator/stdcxx/trunk/include/vector Thu Dec 8 11:10:29 2005
@@ -3,7 +3,7 @@
*
* vector - declarations for the Standard Library vector class
*
- * $Id: //stdlib/dev/include/vector#65 $
+ * $Id$
*
***************************************************************************
*
@@ -1078,12 +1078,12 @@
// algorithms.
//
- void _C_fill (iterator __first, iterator __last, const bool& __value) {
- while (__first != __last) *__first++ = __value;
+ void _C_fill (iterator __first, iterator __last, bool __val) {
+ while (__first != __last) *__first++ = __val;
}
- void _C_fill_n (iterator __first, size_type __n, const bool& __value) {
- while (__n-- > 0) *__first++ = __value;
+ void _C_fill_n (iterator __first, size_type __n, bool __val) {
+ while (__n-- > 0) *__first++ = __val;
}
#ifndef _RWSTD_NO_INLINE_MEMBER_TEMPLATES
@@ -1163,13 +1163,13 @@
// working around a SunPro 5.3 bug (see PR #25962)
_EXPLICIT
#endif // SunPro > 5.3
- vector (size_type __n, bool __value = bool(),
+ vector (size_type __n, bool __val = bool (),
const _Allocator& __alloc = allocator_type ())
: allocator_type (__alloc), _C_bufend(0) {
_C_init(__n);
unsigned int * __first = _C_begin._C_p;
size_type __m = (__n + _RWSTD_WORD_BIT - 1)/_RWSTD_WORD_BIT;
- while (__m-- > 0) *__first++ = __value ? ~0 : 0;
+ while (__m-- > 0) *__first++ = __val ? ~0 : 0;
}
vector (const _C_self &__x)