Den 01-12-2011 22:46, Charley Bay skrev:
>
> qLog(Type) << "string=" << str << ", int=" << i;
>
> That code is not re-entrant,

Wrong.

class LoggerHelper {
   ...
   ~LoggerHelper() {
     doActualLogging();
   }
};

LoggerHelper& operator<<(LoggerHelper&, const T&) {
   // Log T here
}

Bo Thorsen,
Fionia Software.

-- 

Expert Qt and C++ developer for hire
Contact me if you need expert Qt help
http://www.fioniasoftware.dk
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to