basically this reproduces the problem in a simplified setup. Especially note that we're going through a single instance of the factory, yet still this single instance 'sees' two different locations of the class static variable
28 lines
379 B
C++
28 lines
379 B
C++
#include "lib/test/run.hpp"
|
|
|
|
#include "clang-static-init.hpp"
|
|
|
|
#include <iostream>
|
|
|
|
|
|
using ::test::Test;
|
|
using std::cout;
|
|
using std::endl;
|
|
|
|
using namespace test;
|
|
|
|
int
|
|
main (int, char**)
|
|
{
|
|
cout << "\n.gulp.\n";
|
|
|
|
Subject& ref1 = fab();
|
|
Subject& sub2 = test::fabricate();
|
|
|
|
cout << "sub1="<< &ref1 << " sub2="<< &sub2 <<"\n";
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
|