[PATCH] improve example code in libstdc++ docs

Jonathan Wakely cow@compsoc.man.ac.uk
Wed Jul 30 12:02:00 GMT 2003

This patch makes a slight change to the example of correct string
transformations in the libstdc++ online docs:


Benjamin pointed out that std::locale::classic() is a faster way to get
std::locale("C"), so I've changed the docs to use that.

2003-07-30  Jonathan Wakely  <redi@gcc.gnu.org>

        * docs/html/22_locale/howto.html: Use locale::classic() instead
	of locale("C").

Will commit this afternoon if there are no objections.


"A woman drove me to drink, I never had the courtesy to thank her."
	- W.C. Fields
-------------- next part --------------
Index: docs/html/22_locale/howto.html
RCS file: /cvs/gcc/gcc/libstdc++-v3/docs/html/22_locale/howto.html,v
retrieving revision 1.16
diff -u -p -b -B -r1.16 howto.html
--- docs/html/22_locale/howto.html	20 Nov 2002 01:12:02 -0000	1.16
+++ docs/html/22_locale/howto.html	30 Jul 2003 11:43:17 -0000
@@ -187,9 +187,8 @@
    int main ()
       std::string  s("Some Kind Of Initial Input Goes Here");
-      std::locale  loc_c("C");
-      ToUpper      up(loc_c);
-      ToLower      down(loc_c);
+      ToUpper      up(std::locale::classic());
+      ToLower      down(std::locale::classic());
       // Change everything into upper case.
       std::transform(s.begin(), s.end(), s.begin(), up);

More information about the Libstdc++ mailing list