|
From: <mor...@us...> - 2011-01-09 02:47:52
|
Revision: 3886
http://ecell.svn.sourceforge.net/ecell/?rev=3886&view=rev
Author: moriyoshi
Date: 2011-01-09 02:47:45 +0000 (Sun, 09 Jan 2011)
Log Message:
-----------
* better do it in this way for compatibility with older GCC.
Modified Paths:
--------------
ecell3/trunk/ecell/libecs/Polymorph.hpp
Modified: ecell3/trunk/ecell/libecs/Polymorph.hpp
===================================================================
--- ecell3/trunk/ecell/libecs/Polymorph.hpp 2011-01-05 12:20:12 UTC (rev 3885)
+++ ecell3/trunk/ecell/libecs/Polymorph.hpp 2011-01-09 02:47:45 UTC (rev 3886)
@@ -1917,12 +1917,25 @@
return as<PolymorphValue::Tuple const& >();
}
+template<>
+class ConvertTo< String, Polymorph >
+{
+public:
+ const String operator()( const Polymorph& aValue )
+ {
+ return aValue.as< String >();
+ }
+};
template< typename Tnew_ >
-inline Tnew_ convertTo( const Polymorph& aValue )
+class ConvertTo< Tnew_, Polymorph >
{
- return aValue.as< Tnew_ >();
-}
+public:
+ const Tnew_ operator()( const Polymorph& aValue )
+ {
+ return aValue.as< Tnew_ >();
+ }
+};
//
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|