'unchecked_mismatch':不是'stdext的成员

时间:2014-03-10 00:46:52

标签: c++ visual-studio-2012

我已经将Visual Studio 2005用于我的项目很长一段时间了。以下电话从未失败过。

stdext :: unchecked_mismatch

但是,一旦我将其升级到Visual Studio 2012,相同的调用就会导致错误

错误C2039:'unchecked_mismatch':不是'stdext'的成员 错误C3861:'unchecked_mismatch':未找到标识符

我想知道它是否已被移动到其他库或它已不再受支持。

提前致谢。

3 个答案:

答案 0 :(得分:0)

  

我想知道它是否已被移至其他图书馆或不再受支持。

好了,视觉工作室stdext库的unchecked_mismatch is not part了。所以,它不再受支持了。

答案 1 :(得分:0)

我发现可以在

中找到类似方法“不匹配”的调用
#include <algorithm>

然后通过std :: mismatch

调用'mismatch'

将进一步检查它是否完全兼容。

答案 2 :(得分:0)

您必须使用'_MSC_VER&gt; = 1600'查看并使用'stdext :: make_unchecked_array_iterator',如下所示:

# Input data
myList = ["hello.how.are.you", "hello.how.are.they", "hello.how.are.we"]

# Define a function to operate on a string
def get_last_part(s):
    return s.split(".")[-1]

# Use a list comprehension to apply the function to each item
answer = [get_last_part(s) for s in myList]

# Sample output
>>> answer: ["you", "they", "we"]