Emulating static constructors for templated classes
问题 I would like to have a templated class with a static data member, and initialize it by emulating a "static constructor." For a non-templated class, this has already been answered (see static constructors in C++? I need to initialize private static objects and What is a static constructor?). However, none of the answers seem to work for a templated class. The following is an example that tries to adapt the "static constructor" idiom from the previous answers to a templated class. (Note that