我已经在我的项目中使用Visual 2005很长时间了。下面的呼叫从未失败。
stdext::unchecked_mismatch
但是,一旦我将它升级到Visual 2012,相同的调用将导致错误
error C2039:'unchecked_mismatch':不是'stdext‘错误C3861的成员:’unchecked_失配‘:标识符未找到
我想知道它是否已被移到其他库,或者不再支持它。
提前谢谢。
发布于 2014-03-10 01:28:20
我发现对类似方法的调用“不匹配”可以在
#include <algorithm>然后,通过std::失配调用“失配”。
将进一步检查它是否完全兼容。
发布于 2014-03-10 00:54:36
我想知道它是否已被移到其他库,或者不再支持它。
嗯, is not part的视频工作室stdext库了。所以,它不再受支持。
发布于 2016-01-12 01:49:04
您必须检查“_MSC_VER >= 1600”并使用“stdext::make_unchecked_array_iterator”,如下所示:
#if defined(_STDEXT_BEGIN) && !(defined(_MSC_VER) && (_MSC_VER < 1400 || _MSC_VER >= 1600)) && !defined(_STLPORT_VERSION)
stdext::unchecked_mismatch
#else
std::mismatch
#endif
#if _MSC_VER >= 1600
(stdext::make_unchecked_array_iterator(scan)+3, stdext::make_unchecked_array_iterator(scanEnd), stdext::make_unchecked_array_iterator(match)+3).first - stdext::make_unchecked_array_iterator(scan));
#else
(scan+3, scanEnd, match+3).first - scan);
#endifhttps://stackoverflow.com/questions/22290311
复制相似问题