C17中是否使用“std :: is_invocable”替换“std :: is_callable”?

C17中是否使用“std :: is_invocable”替换“std :: is_callable”?,第1张

概述cppref已经删除std :: is_callable的入口页面,并改用std :: is_invocable条目页面. 但是,std :: is_callable在Visual Studio 2017中仍然可用. 在C 17中使用std :: is_invocable正式表示std :: is_callable [replace | deprecated | removed] 是的,is_ca cppref已经删除std :: is_callable的入口页面,并改用std :: is_invocable条目页面.

但是,std :: is_callable在Visual Studio 2017中仍然可用.

在C 17中使用std :: is_invocable正式表示std :: is_callable [replace | deprecated | removed]

解决方法 是的,is_callable已经被重命名为is_invocable,如 p0604r0所述.本文包括这个决定的理由:

Rename is_callable to is_invocable: is_callable would be the most natural name for a trait that answers the question whether a function call Expression would be valID or not,which is a strict subset of the Expressions,INVOKE supports,furthermore the changed name is_invocable much clearer expresses its meaning. Releasing the name is_callable allows us in the future to possibly introduce a pure is_callable trait.

总结

以上是内存溢出为你收集整理的C17中是否使用“std :: is_invocable”替换“std :: is_callable”?全部内容,希望文章能够帮你解决C17中是否使用“std :: is_invocable”替换“std :: is_callable”?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/1258644.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-07
下一篇 2022-06-07

发表评论

登录后才能评论

评论列表(0条)

保存