As an example, consider this header:
#include <iostream>
template<bool = true>
struct A {
A() {
static int x;
std::cout << &x << "\n";
}
};
static A<> a;
What if I had two different C++ files including this file - would it print the same address twice, guaranteed? Even more importantly, if x was an object of a different type with a non-trivial constructor, would it be guaranteed to only be run once?