https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61973
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Nadav Har'El from comment #0) > Bonus points to anyone who can figure out how I can use __thread (not > thread_local) on a type with a non-trivial destructor even in existing gcc > ;-) __thread std::aligned_storage<T>::type buf; __thread T* obj = [&]{ return ::new(&buf) T(blah blah); }();