ThreadLocalValue can't have ctor


#1

Under MSVC objects with __declspec(thread) cannot have constructors. This goes against the doc comment for ThreadLocalValue which states "...any class that has a default constructor..."

This begs the question, how do you use ThreadLocalValue with a pointer and have the pointer initialized to null? Does ThreadLocalValue guarantee that POD types are zero-filled? It's not obvious from the code or docs.


#2

Yes, they'll get statically initialised to 0. Didn't realise that the MSVC implementation only supported POD types - I'll add a note about that..