This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/66944] ICE on static thread_local member in class template


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66944

--- Comment #7 from Jason Vas Dias <jason.vas.dias at gmail dot com> ---
And there is no workaround, really - one cannot initialize a 
C++ class object member of a static thread_local C++ template class object
member in one place, outside the class, and use that same object in a 
non-static member function of the template class,
and instantiate another instance of the same template (with different
parameters) in the same translation unit - re-declaration in each
using member function allows compilation to succeed, but just hides
the static class member, so you can't actually use the single initialized 
static member in a non-static member function. 

So you HAVE to access thread_local static class members ONLY through pointers ?
I will try this.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]