Is there a way to suppress Intellisense errors whe

2019-02-11 12:55发布

问题:

My code compiles and runs just fine (so far...), however, because Visual Studio's Intellisense doesn't yet support the C++11 features new to the 2012 CTP's compiler:

Having chunks of perfectly good (albeit experimental) code underlined red tends to throw me off a bit. Is there a way to tell Intellisense to ignore errors in specific places?

Can someone recommend an IDE that already offers proper syntax highlighting and checking for these new features (specifically, delegating constructors, initializer lists and variadic templates, these are the ones that got me hooked)?

回答1:

I'm quite confident you cannot do that.

The CTP independently updates the compiler only, not Intellisense. Intellisense is based on EDG's front-end, which the CTP does not update (even regardless of the CTP, Intellisense and the compiler might disagree at times because of this). See also this Q&A on SO for a clarification.

You can, of course, disable Intellisense completely, but I don't think that's what you were asking for.



回答2:

Go to:

Tools->Options->Text Editor->C/C++->Advanced->Intellisense

and set "Disable Error Reporting" to true.