error C2679: binary '<<': no operator found which takes a right-hand operand of type 'const T' (or there is no acceptable conversion)
#include <cppunit/Portability.h>
#include <cppunit/portability/Stream.h>
#include <string>
#include <iostream>
#include <type_traits>
CPPUNIT_NS_BEGIN
/*! \brief Methods for converting values to strings. Replaces CPPUNIT_NS::StringTools::toString
*/
namespace StringHelper
{
// work around to handle C++11 enum class correctly. We need an own conversion to std::string
// as there is no implicit coversion to int for enum class.
template<typename T>
typename std::enable_if<!std::is_enum<T>::value, std::string>::type toString(const T& x)
{
OStringStream ost;
ost << x;
return ost.str();
}
Im refering cppunit file in my vc++ project for unit test execution. while building the application, getting the above error.