mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 07:16:10 +01:00
Added some specialisations for toString
This commit is contained in:
parent
263c046b84
commit
1172d26705
@ -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
|
||||
{
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user