[ADT] Add SFINAE guards to unique_function constructor.
We can't construct a working unique_function from an object that's not callable with the right types, so don't allow deduction to succeed. This avoids some ambiguous conversion cases, e.g. allowing to overload on different unique_function types, and to conversion operators to unique_function. std::function and the any_invocable proposal have these. This was added to llvm::function_ref in D88901 and followups Differential Revision: https://reviews.llvm.org/D96794
Loading
Please register or sign in to comment