I have the following macro.
#define STRING_STREAM( data ) \
( ( (std::ostringstream&) \
( std::ostringstream( ).seekp( 0, std::ios_base::cur ) << data ) ).str( ) )
I am trying to overload << for an enum:
std::ostringstream& operator<<( std::ostringstream& oStrStream, TestEnum& testEnum )
{
oStrStream << "TestEnum";
return oStrStream;
}
When I call STRING_STREAM( testEnum ), it doesn't use the overloaded <<. It prints enums number value.