C2070 - illegal sizeof operand

前端 未结 2 822
忘了有多久
忘了有多久 2020-12-11 16:52

The following code looks fine to me:

    #include 

    template 
    struct A
    {
        static float m_kA[];
    };

           


        
2条回答
  •  情深已故
    2020-12-11 17:21

    http://ideone.com/3ssVi

    it compiles fine with G++.

    As far as i can see it can be related to this bug:

    http://connect.microsoft.com/VisualStudio/feedback/details/759407/can-not-get-size-of-static-array-defined-in-class-template

提交回复
热议问题