visualstudio2010-从Intellisense隐藏C++代码块

visual studio 2010 - Hide a C++ code block from Intellisense

本文关键字:代码 C++ 隐藏 Intellisense visualstudio2010-      更新时间:2023-10-16

为了解决MSVC++2010中的一些Intellisense缺陷,我想向Intellisense"隐藏"一些代码块,但不向编译器"隐藏"。例如:

#ifndef INTELLISENSE
void foo(); // compiled, but skipped by Intellisense
#endif

我正在寻找这个INTELLISENSE宏的确切名称,如果这样的宏存在的话;或者用同样的方法来做同样的事情。

VC++2010的正确宏是__INTELLISENSE__,如本文所述:IntelliSense慢速的故障排除技巧