As mentioned earlier, you used a variable template.
If I am not mistaken, variable templates are similar to the following:
template<class T>
struct X {
static T x;
};
template<class T>
T X<T>::x = T{};
, :
void foo() {
class Test {
public:
Test() { std::printf("Test::Test\n"); }
};
Test t = X<Test>::x;
}
, : coliru.
foo, .
main, Test::Test.
, , , , , foo , Test , foo, X<Test>::x - ...
... , , , .
, , / , .