error C4592: symbol will be dynamically initialized. VS2015.1 static const std::vector field

后端 未结 4 665
情深已故
情深已故 2021-02-13 00:02

after update VS2015.1 next code no longer compiles:

class testClass
{
static const std::vector test;
};

initialization



        
4条回答
  •  鱼传尺愫
    2021-02-13 00:37

    in my case I solved this by usage of std::array, and it works for me, but in general case, I suppose that warning disabling is solution

    #pragma warning( disable : 4592)
    

提交回复
热议问题