From: Sam McCall Date: Mon, 19 Oct 2020 12:58:31 +0000 (+0200) Subject: [ADT] Avoid use of result_of_t in function_ref X-Git-Tag: llvmorg-13-init~8891 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=375f7a416031b3a011a5a88ba5f80f5879d775ca;p=platform%2Fupstream%2Fllvm.git [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 --- diff --git a/llvm/include/llvm/ADT/STLExtras.h b/llvm/include/llvm/ADT/STLExtras.h index 0d18164..f3f9f20 100644 --- a/llvm/include/llvm/ADT/STLExtras.h +++ b/llvm/include/llvm/ADT/STLExtras.h @@ -199,9 +199,9 @@ public: function_ref>::value> * = nullptr, // Functor must be callable and return a suitable type. std::enable_if_t::value || - std::is_convertible< - std::result_of_t, Ret>::value> - * = nullptr) + std::is_convertible()( + std::declval()...)), + Ret>::value> * = nullptr) : callback(callback_fn::type>), callable(reinterpret_cast(&callable)) {}