static member of the templated class not created unless referenced

前端 未结 0 1557
囚心锁ツ
囚心锁ツ 2020-12-23 12:44
#include 

template 
class Temp {
 public:
  static Temp temp;
  Temp() { std::cout << "hi!"; }
};

// Definition.
         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题