From 375f7a416031b3a011a5a88ba5f80f5879d775ca Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Mon, 19 Oct 2020 14:58:31 +0200 Subject: [PATCH] [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 --- llvm/include/llvm/ADT/STLExtras.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)) {} -- 2.7.4