template <typename T>
class foo {
private:
staticint bar;
};
Is bar shared between all objects of type foo, or is it grouped so that all objects of type foo<T1> share one bar and those of type foo<T2> share a different bar? If it's the same for all objects of type foo, regardless of T, then what about this:
1 2 3 4 5
template <typename T>
class foo {
private:
static T bar;
};