fix(CppUnit): enable_if disarm numeric notEqualsMessage

This commit is contained in:
Alex Fabijanic 2022-05-29 09:13:30 -05:00
parent 9740190551
commit a17a7bf027

View File

@ -155,7 +155,9 @@ protected:
long lineNumber = CppUnitException::CPPUNIT_UNKNOWNLINENUMBER,
const std::string& fileName = CppUnitException::CPPUNIT_UNKNOWNFILENAME);
template <typename T1, typename T2>
template <typename T1, typename T2,
typename = typename std::enable_if<std::is_arithmetic<T1>::value, T1>::type,
typename = typename std::enable_if<std::is_arithmetic<T2>::value, T2>::type>
std::string notEqualsMessage(T1 expected, T2 actual)
{
return "expected: " + std::to_string(expected) + " but was: " + std::to_string(actual);