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 2007/05/12 19:30:05 UTC

svn commit: r537490 - /incubator/stdcxx/trunk/examples/manual/money_get.cpp

Author: sebor
Date: Sat May 12 10:30:04 2007
New Revision: 537490

URL: http://svn.apache.org/viewvc?view=rev&rev=537490
Log:
2007-05-12  Martin Sebor  <se...@roguewave.com>

	* money_get.cpp (main): Removed a redundant template argument
	for brevity and introduced a typedef for better readability.

Modified:
    incubator/stdcxx/trunk/examples/manual/money_get.cpp

Modified: incubator/stdcxx/trunk/examples/manual/money_get.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/examples/manual/money_get.cpp?view=diff&rev=537490&r1=537489&r2=537490
==============================================================================
--- incubator/stdcxx/trunk/examples/manual/money_get.cpp (original)
+++ incubator/stdcxx/trunk/examples/manual/money_get.cpp Sat May 12 10:30:04 2007
@@ -52,8 +52,6 @@
 
 int main (int argc, char *argv[])
 {
-    typedef std::istreambuf_iterator<char, std::char_traits<char> > Iter;
-  
     // Get the monetary string and locale from the argument vector.
     const char* const buffer  = 1 < argc ? argv [1] : "$1,234.6789";
     const char* const locname = 2 < argc ? argv [2] : en_US;
@@ -67,8 +65,10 @@
     // Retrieve the money_get facet from the named locale.
     const std::locale loc (locname);
 
-    const std::money_get<char, Iter> &mgf =
-        std::use_facet<std::money_get<char, Iter> >(loc);
+    typedef std::istreambuf_iterator<char> Iter;
+    typedef std::money_get<char, Iter>     MoneyGet;
+
+    const MoneyGet &mgf = std::use_facet<MoneyGet>(loc);
 
     {
         // Build an istringstream object from the buffer