[libcxx-commits] [libcxx] [libc++] Define an internal API for std::invoke and friends (PR #116637)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Nov 18 07:47:31 PST 2024
================
@@ -25,7 +25,9 @@ template <class _Callable>
class _LIBCPP_DEPRECATED_IN_CXX17 result_of;
template <class _Fp, class... _Args>
-class _LIBCPP_TEMPLATE_VIS result_of<_Fp(_Args...)> : public __invoke_of<_Fp, _Args...> {};
+class _LIBCPP_TEMPLATE_VIS result_of<_Fp(_Args...)> {
+ using type = __invoke_result_t<_Fp, _Args...>;
----------------
frederick-vs-ja wrote:
Perhaps we shouldn't simplify `result_of` because the member `type` was required to be conditionally present in C++14/17, see [N3462](https://wg21.link/n3462).
https://github.com/llvm/llvm-project/pull/116637
More information about the libcxx-commits
mailing list