简体   繁体   中英

Visual Studio 2010 - C++ Compile time IntelliSense errors

Sometimes when I compile C++ projects, the build goes successful by saying "Build Succeeded". But, if you clicked on error list, it may show some errors such as "IntelliSense: incomplete type is not allowed". My question is what is that "IntelliSense" errors and should I have concerns on output executable file?

Intellisense errors are not necessarily real compiler errors. Remember Intellisense is a separate partial compiler designed for speed over accuracy. It partially compiles your code to help generate IDE completions and also is used by the IDE underline possible errors in the Visual Studio IDE.

The IntelliSense parser, starting with VS2010, is a product of a different company. EDG, the Edison Design Group, pretty famous in the C++ world for being the only ones that ever wrote a front-end for C++03 that was 100% compliant with that standard.

But it isn't 100% compatible with the MSVC++ compiler. VS2010 were training wheels, they've been chipping away at the incompatibilities. Some differences are pretty fundamental, MSVC++ uses a uncommon way to perform macro substitutions in the pre-processor for example. A detail that was never specified in the language standard and Microsoft committed, early, to a choice that's different from everybody else's. Very hard to fix, way too many of their customers took a dependency on that.

You could look on the bright side of this problem. Your code is dodgy and likely to be troublesome if you ever port to g++ of clang. If you need help to get it undodged then just ask a question about it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM