While reading the very nice blog post by Niklas Frykholm linked below, I came across something I can't quite wrap my head around.
http://bitsquid.blogspot.nl/2012/01/sensible-error-handling-part-1.html
This code confused me:
__THREAD Array<const char *> *_error_context_name;
__THREAD Array<const char *> *_error_context_data;
The code defines a thread local pointer to an array of strings which is used as a simple stack. The thing I don't quite understand is how one would initialize and destroy the arrays in a cross-platform manner? Also how does this work with dll boundaries?