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
To make it work you have to add overload of operator << for functions, than call the function from it:
class CAudit { //...other details here as in original question CAudit& operator << (CAudit & (*func)(CAudit &)) { return func(*this); } }; CAudit audit; audit << "some text" << CAudit::write;