This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

stl_algo.h name conflict with gcc internal


The name `__opr' means `operator long double' in gcc name
mangling.  The use of `__opr' as a function parameter in
stl_algo.h has now and then caused an obscure error message for
a long time (also in v2).  I suggest the following change.

Cheers,
 -petter.


1999-10-20  Petter Urkedal  <petter@matfys.lth.se>

	* stl/bits/stl_algo.h (transform): Change function parameter name
	from `__opr' to `__unary_op' to avoid conflict with gcc mangling.


Index: stl_algo.h
===================================================================
RCS file: /cvs/libstdc++/libstdc++/stl/bits/stl_algo.h,v
retrieving revision 1.8
diff -u -r1.8 stl_algo.h
--- stl_algo.h	1999/04/06 17:44:02	1.8
+++ stl_algo.h	1999/10/20 10:47:56
@@ -449,9 +449,9 @@
 
 template <class _InputIter, class _OutputIter, class _UnaryOperation>
 _OutputIter transform(_InputIter __first, _InputIter __last,
-                      _OutputIter __result, _UnaryOperation __opr) {
+                      _OutputIter __result, _UnaryOperation __unary_op)
{
   for ( ; __first != __last; ++__first, ++__result)
-    *__result = __opr(*__first);
+    *__result = __unary_op(*__first);
   return __result;
 }
 

-- 
[http://matfys.lth.se/~petter/]

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]