Added some specialisations for toString

This commit is contained in:
Phil Nash 2011-01-11 09:21:23 +00:00
parent 263c046b84
commit 1172d26705
1 changed files with 22 additions and 0 deletions

View File

@ -83,6 +83,28 @@ std::string toString( const T& value )
return Detail::StringMaker<T, Detail::IsStreamable<T>::value>::apply( value );
}
template<>
inline std::string toString<std::string>( const std::string& value )
{
return value;
}
template<>
inline std::string toString<int>( const int& value )
{
std::ostringstream oss;
oss << value;
return oss.str();
}
template<>
inline std::string toString<double>( const double& value )
{
std::ostringstream oss;
oss << value;
return oss.str();
}
class TestFailureException
{
};