This is the mail archive of the libstdc++@gcc.gnu.org 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]
Other format: [Raw text]

Missing std:: qualifications


I'm currently working on a platform that doesn't pollute the global namespace 
in an unsolicited fashion, and I keep running in to problems with headers 
that depend on global namespace pollution.  Here's a simple one, I can post 
more as I find time and bandwidth..

Index: char_traits.h
===================================================================
RCS file: /cvsroot/gcc/gcc/libstdc++-v3/include/bits/char_traits.h,v
retrieving revision 1.23
diff -u -r1.23 char_traits.h
--- char_traits.h	16 Oct 2003 22:37:50 -0000	1.23
+++ char_traits.h	6 Nov 2003 14:22:33 -0000
@@ -148,7 +148,7 @@
     char_traits<_CharT>::
     compare(const char_type* __s1, const char_type* __s2, std::size_t __n)
     {
-      for (size_t __i = 0; __i < __n; ++__i)
+      for (std::size_t __i = 0; __i < __n; ++__i)
 	if (lt(__s1[__i], __s2[__i]))
 	  return -1;
 	else if (lt(__s2[__i], __s1[__i]))

-- 
Stephen M. Webb
stephen.webb@bregmasoft.com


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