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

后端 未结 4 1213
有刺的猬
有刺的猬 2021-02-13 00:17

after update VS2015.1 next code no longer compiles:

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

initialization



        
4条回答
  •  悲哀的现实
    2021-02-13 00:31

    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)
    

提交回复
热议问题