mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[BE] Get rid of std::result_of
in c10
(#85977)
As it is a deprecated and to be removed in C++20 Fixes https://github.com/pytorch/pytorch/issues/85962 Pull Request resolved: https://github.com/pytorch/pytorch/pull/85977 Approved by: https://github.com/kit1980
This commit is contained in:
committed by
PyTorch MergeBot
parent
c2d9ea7f4b
commit
01292cc9e4
@ -55,7 +55,7 @@ class function_ref<Ret(Params...)> {
|
||||
typename std::remove_reference<Callable>::type,
|
||||
function_ref>::value>::type* = nullptr,
|
||||
typename std::enable_if<std::is_convertible<
|
||||
typename std::result_of<Callable && (Params && ...)>::type,
|
||||
typename c10::invoke_result_t<Callable, Params...>,
|
||||
Ret>::value>::type* = nullptr)
|
||||
: callback(callback_fn<typename std::remove_reference<Callable>::type>),
|
||||
callable(reinterpret_cast<intptr_t>(&callable)) {}
|
||||
|
Reference in New Issue
Block a user