c.hpp:
class C
{
private:
static SomeClass var;
public:
static void f()
{
// Uses var;
}
};
c.cpp:
SomeClass C::var;
Is it always safe to call C::f()
? For instance, from constructor of some global variable defined in a different compilation unit?