Why do I get these warnings in Visual C++ 2008 when building a struct?

前端 未结 3 814
太阳男子
太阳男子 2021-01-18 10:37

I have this code

typedef struct
{
    const char* fooString;
    const bool  fooBool;
}fooStruct;

And this initializer:

sta         


        
3条回答
  •  渐次进展
    2021-01-18 10:52

    The C4610 warning is incorrect. This is a known bug in Visual C++. See the Microsoft Connect bug "Improper issuance of C4610."

    Adam Rosenfield explains why the other two warnings (C4510 and C4512) are emitted.

提交回复
热议问题