stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r550774 - in /incubator/stdcxx/trunk/examples/manual: moneyput.cpp num_get.cpp time_get.cpp
Date Tue, 26 Jun 2007 11:03:33 GMT
Author: faridz
Date: Tue Jun 26 04:03:33 2007
New Revision: 550774

URL: http://svn.apache.org/viewvc?view=rev&rev=550774
Log:
2007-06-26 Farid Zaripov <Farid_Zaripov@epam.com>

	STDCXX-462
	* moneyput.cpp (main): Create named std::locale object instead of unnamed.
	* num_get.cpp (main): Ditto.
	* time_get.cpp (main): Ditto.

Modified:
    incubator/stdcxx/trunk/examples/manual/moneyput.cpp
    incubator/stdcxx/trunk/examples/manual/num_get.cpp
    incubator/stdcxx/trunk/examples/manual/time_get.cpp

Modified: incubator/stdcxx/trunk/examples/manual/moneyput.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/examples/manual/moneyput.cpp?view=diff&rev=550774&r1=550773&r2=550774
==============================================================================
--- incubator/stdcxx/trunk/examples/manual/moneyput.cpp (original)
+++ incubator/stdcxx/trunk/examples/manual/moneyput.cpp Tue Jun 26 04:03:33 2007
@@ -44,9 +44,11 @@
     // Construct a ostreambuf_iterator on cout
     Iter begin (std::cout);
 
+    const std::locale loc;
+
     // Get a money put facet
     const std::money_put<char, Iter> &mp = 
-        std::use_facet<std::money_put<char, Iter> >(std::locale ());
+        std::use_facet<std::money_put<char, Iter> >(loc);
 
     // Put out the string representation of the monetary value
     std::cout << buffer << " --> ";

Modified: incubator/stdcxx/trunk/examples/manual/num_get.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/examples/manual/num_get.cpp?view=diff&rev=550774&r1=550773&r2=550774
==============================================================================
--- incubator/stdcxx/trunk/examples/manual/num_get.cpp (original)
+++ incubator/stdcxx/trunk/examples/manual/num_get.cpp Tue Jun 26 04:03:33 2007
@@ -42,9 +42,11 @@
     long        lval  = 0L;
     long double ldval = 0.0;
 
+    const std::locale loc;
+
     // Get a num_get facet
     const std::num_get<char, Iter> &ng =
-        std::use_facet<std::num_get<char, Iter> >(std::locale ());
+        std::use_facet<std::num_get<char, Iter> >(loc);
 
 #ifndef _RWSTD_NO_BOOL
     {

Modified: incubator/stdcxx/trunk/examples/manual/time_get.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/examples/manual/time_get.cpp?view=diff&rev=550774&r1=550773&r2=550774
==============================================================================
--- incubator/stdcxx/trunk/examples/manual/time_get.cpp (original)
+++ incubator/stdcxx/trunk/examples/manual/time_get.cpp Tue Jun 26 04:03:33 2007
@@ -78,9 +78,11 @@
     Iter begin (ins);
     Iter end;
 
+    const std::locale loc ("C");
+
     // Get a reference to the time_get facet in locale loc.
     const std::time_get<char, Iter> &tg =
-        std::use_facet<std::time_get<char, Iter> >(std::locale ("C"));
+        std::use_facet<std::time_get<char, Iter> >(loc);
 
     // Display time_base::dateorder value.
     std::cout << "time_base::dateorder == " << tg.date_order () << ".\n";



Mime
View raw message