What is going on here?
Code:const int value = 1;
// x is a public int
Test::Test() : x(value)
{}
Code:Test& Test::instance()
{
static Test instance;
return instance;
}
Code:Test test = Test::instance();
cout << test.x << endl; // This produces 0 and not 1!
