c++ decltype
Destruction order vs thread safety in C++