Anyway, one of the first things I noticed was that NDC's don't have a natural way to follow the RAII paradigm to ensure they get cleaned up. I made a simple wrapper class that seems to work just fine. So, I'm curious, does it make sense to have something like this:
struct NDCGuard {
inline NDCGuard(const String& message) {
NDC::push(message);
} inline ~NDCGuard() {
NDC::pop();
}
};It should add no overhead, but it makes for a simple way to manage your NDC's without them getting out of sync. Thoughts?
--Chris
