forked from OSchip/llvm-project
[ADT] Avoid use of result_of_t in function_ref
It has bugs on some old libc++ versions and we don't need the power. See https://reviews.llvm.org/D88977
This commit is contained in:
parent
c872faf6e0
commit
375f7a4160
|
@ -199,9 +199,9 @@ public:
|
|||
function_ref>::value> * = nullptr,
|
||||
// Functor must be callable and return a suitable type.
|
||||
std::enable_if_t<std::is_void<Ret>::value ||
|
||||
std::is_convertible<
|
||||
std::result_of_t<Callable(Params...)>, Ret>::value>
|
||||
* = nullptr)
|
||||
std::is_convertible<decltype(std::declval<Callable>()(
|
||||
std::declval<Params>()...)),
|
||||
Ret>::value> * = nullptr)
|
||||
: callback(callback_fn<typename std::remove_reference<Callable>::type>),
|
||||
callable(reinterpret_cast<intptr_t>(&callable)) {}
|
||||
|
||||
|
|
Loading…
Reference in New Issue