I am trying to write a simple audit class that takes input via operator << and writes the audit after receiving a custom manipulator like this:
class C
Wouldn't this
class CAudit { public: template< typename T > CAudit& operator<<( const T& data ) { audittext << data; return *this; } class write {}; void operator<<( const write& data ) { /* whatever */ } private: std::stringstream audittext; };
do what you want?