Hi all, following is an example regarding the generation of guards for the static m in template X. My goal ist to suppress(!) the generation of the guards (for use on microcontroller). 1) If no user-defined ctors are used, no guards are generated 2) With anon-ns, no guards are generated But even 3) if I make it a local static instead as a static member and use -fno-threadsafe-statics, the guards are generated Option 1) or 2) are not applicable for me, so I went for option 3), but that did not work either. Any hints? Wilhelm // Test für guard variable struct A { inline A(int v = 0) {} // without user-defined ctors, guards are omitted int m1() const { return m; } private: int m = 0; }; //namespace { // without anon-ns guards, are generated template<typename T> struct X { static int foo() { // static T m; // even as local-static and -fno-threadsafe-statics, guards are generated return m.m1(); } inline static T m; }; //} int main() { return X<A>::foo(); }