"std::is_callable" 在 C++17 中被 "std::is_invocable" 取代了吗?

Is "std::is_callable" replaced with "std::is_invocable" in C++17?

cppref 已删除 std::is_callable 的入口页面,并改用 std::is_invocable 入口页面。

但是,std::is_callable 在 Visual Studio 2017 年仍然可用。

在 C++17 中 std::is_callable 是否正式 [replaced|deprecated|removed] with std::is_invocable

是的,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.