lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [4812] Work around an msvc defect (VZ)


From: Greg Chicares
Subject: [lmi-commits] [4812] Work around an msvc defect (VZ)
Date: Wed, 24 Mar 2010 22:34:20 +0000

Revision: 4812
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=4812
Author:   chicares
Date:     2010-03-24 22:34:20 +0000 (Wed, 24 Mar 2010)
Log Message:
-----------
Work around an msvc defect (VZ)

Modified Paths:
--------------
    lmi/trunk/ChangeLog
    lmi/trunk/numeric_io_cast.hpp

Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2010-03-24 12:07:20 UTC (rev 4811)
+++ lmi/trunk/ChangeLog 2010-03-24 22:34:20 UTC (rev 4812)
@@ -24626,7 +24626,7 @@
 20100324T1206Z <address@hidden> [761]
 
   fenv_lmi_test.cpp
-Include a required header, resolving a GNU/Linux issue. See:
+Include a required header, resolving a GNU/Linux issue (VZ). See:
   http://lists.nongnu.org/archive/html/lmi/2010-03/msg00061.html
 
 20100324T1207Z <address@hidden> [761]
@@ -24638,3 +24638,10 @@
   obstruct_slicing_test.cpp
 Resolve unit-test build issues with an ancient compiler.
 
+20100324T2234Z <address@hidden> [761]
+
+  numeric_io_cast.hpp
+Work around an msvc defect (VZ). See:
+  http://lists.nongnu.org/archive/html/lmi/2010-03/msg00060.html
+  http://lists.nongnu.org/archive/html/lmi/2010-03/msg00067.html
+

Modified: lmi/trunk/numeric_io_cast.hpp
===================================================================
--- lmi/trunk/numeric_io_cast.hpp       2010-03-24 12:07:20 UTC (rev 4811)
+++ lmi/trunk/numeric_io_cast.hpp       2010-03-24 22:34:20 UTC (rev 4812)
@@ -42,6 +42,9 @@
 #   define BOOST_STATIC_ASSERT(deliberately_ignored) class IgNoRe
 #endif // defined __BORLANDC__
 
+template<typename To, typename From>
+struct numeric_converter;
+
 /// Design notes for function template numeric_io_cast().
 ///
 /// Converts between arithmetic types and their std::string decimal
@@ -104,7 +107,11 @@
 /// integers as numerals.
 
 template<typename To, typename From>
-To numeric_io_cast(From, To = To());
+To numeric_io_cast(From from, To = To())
+{
+    numeric_converter<To,From> converter;
+    return converter.operator()(from);
+}
 
 // A compile-time failure iff this template is ever instantiated is
 // desired, but the straightforward
@@ -351,12 +358,5 @@
         }
 };
 
-template<typename To, typename From>
-To numeric_io_cast(From from, To)
-{
-    numeric_converter<To,From> converter;
-    return converter.operator()(from);
-}
-
 #endif // numeric_io_cast_hpp
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]