今天VS2012活见鬼,出现了奇怪的链接错误
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(347,5): error MSB6006: "CL.exe" exited with code 1.
查了两个小时以后终于发现原因:
std::map<Type, CString> *stringlist = GetEnumStringList(oType);
for ( auto i : stringlist )
{
for循环仅仅少敲了一个星号,应该是:
std::map<Type, CString> *stringlist = GetEnumStringList(oType);
for ( auto i : *stringlist )
{
气死我了,本应该是一个编译报错的。看来即使VS2012,对模板的检查也相当差劲。
|