boost与MFC的冲突(new)

在MFC对话框程序中用boost::signals2时出现了问题,
由于MFC为了方便调试,在debug下重新定义了new
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
因此与boost产生了冲突

我的解决方法是把boost的头文件放在stdafx.h中其它MFC头文件的上面。
 
原文地址:https://www.cnblogs.com/honker/p/3774496.html