我正在使用我在这里找到的Compile Time Hashing技术试验一个C++项目.宏按预期工作,编译时间合理,但64个递归宏似乎正在使用Visual Studio的Intellisense打地狱.每次简短编辑后,IDE都会挂起约30秒.我怀疑它正在试图解析嵌套的宏.一旦我删除该#include "consthashmacro.h行,响应性就会恢复正常.
有没有办法禁用特定头文件的Intellisense?
我发现这篇题为"通过宏控制IntelliSense"的文章,但那里的解决方案似乎也没有正常工作.
也许这不是智能?它肯定与那个标题有关.有任何想法吗?
编辑:
我尝试通过重命名feacp.dll按照建议完全禁用Intellisense .我得到相同的行为 - 编辑导致IDE长时间挂起.删除标头可恢复性能.VS2055的其他哪些功能可能导致这种令人难以置信的滞后?
若要重现:
使用Visual Studio 2005,使用默认设置创建新的"Win32控制台应用程序"(即:使用预编译的标头).将以下代码添加到cpp文件中.(将'consthashmacro.h'解压缩到源目录中(可从Chris Savoie网站的zip文件中获取)
#include "stdafx.h"
#define CONSTHASH(s) ((s)[0])
//#include "consthashmacro.h"
void Send(long hash, long value)
{
printf("Sending %x %x\n", hash, value);
}
#define QQuot_(x) #x
#define QQuote(x) QQuot_(x)
#define Debug_Print(s, v) (Send( CONSTHASH(QQuote(__LINE__)##s), *((long*)&(v))))
int _tmain(int argc, _TCHAR* argv[])
{
int i = __LINE__;
float f= 3.14f;
Debug_Print("This is a test %d", i); …Run Code Online (Sandbox Code Playgroud)