diff --git a/test/lib_min.cpp b/test/lib_min.cpp new file mode 100644 index 0000000..33da034 --- /dev/null +++ b/test/lib_min.cpp @@ -0,0 +1,43 @@ +#include + +struct A { + int a; + A() + : a(5) + { + puts("A cstr"); + } + ~A() + { + puts("A dstr"); + } + void put() const + { + printf("a=%d\n", a); + } +}; + +template +struct XT { + static A a; +}; + +template +A XT::a; + +typedef XT<0> X; + +static struct Init { + Init() + { + puts("Init"); + X::a.put(); + } +} s_init; + + +int main() +{ + puts("main"); + X::a.put(); +}