Let's break it down. Suppose there's some class Foo;
somewhere. Now we make this a static member of our class,
class Star
{
static Foo z;
// ...
};
Now in essence that declares a global object Foo Star::z
-- so how does this get instantiated? The standard tells you: it gets default-constructed. But remember that you have to provide the actual object instance in one of your translation units:
// in, say, star.cpp
Foo Star::z; // OK, object lives here now
Now suppose that Foo
doesn't actually have a default constructor:
class Foo
{
public:
Foo(char, double); // the only constructor
// ...
};
Now there's a problem: How do we construct Star::z
? The answer is "just like above", but now we have to call a specific constructor:
// again in star.cpp
Foo Star::z('a', 1.5);
The standard actually has two distinct notions of "initialization" (a grammatical concept) and "construction" (a function call), but I don't think we need to go into this just now.