Changeset 15 for trunk/IPs/systemC/processor/Morpheo/Include/ToString.h
- Timestamp:
- Apr 5, 2007, 4:17:30 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Include/ToString.h
r2 r15 1 #ifndef morpheo_ Tostring2 #define morpheo_ Tostring1 #ifndef morpheo_tostring 2 #define morpheo_tostring 3 3 4 4 /* … … 21 21 namespace morpheo { 22 22 23 template<typename T> inline std::string toString (const T& x)23 template<typename T> inline std::string toString (const T& x) 24 24 { 25 25 ostringstream out; … … 28 28 } 29 29 30 template<> inline std::string toString<bool> (const bool& x)30 template<> inline std::string toString<bool> (const bool& x) 31 31 { 32 32 ostringstream out; … … 36 36 } 37 37 38 template<> inline std::string toString<float> (const float& x)38 template<> inline std::string toString<float> (const float& x) 39 39 { 40 40 const int sigdigits = std::numeric_limits<float>::digits10; … … 44 44 } 45 45 46 template<> inline std::string toString<double> (const double& x)46 template<> inline std::string toString<double> (const double& x) 47 47 { 48 48 const int sigdigits = std::numeric_limits<double>::digits10; … … 52 52 } 53 53 54 template<> inline std::string toString<long double>(const long double& x)54 template<> inline std::string toString<long double>(const long double& x) 55 55 { 56 56 const int sigdigits = std::numeric_limits<long double>::digits10;
Note: See TracChangeset
for help on using the changeset viewer.