[PATCH] D123576: Support constructing empty function_ref from other callables that can be "empty"
Mehdi AMINI via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 12 01:55:49 PDT 2022
mehdi_amini added inline comments.
================
Comment at: llvm/include/llvm/ADT/STLFunctionalExtras.h:76
+ // callable is convertible to bool
+ std::enable_if_t<std::is_convertible<Callable, bool>::value> * = nullptr,
+ // Functor must be callable and return a suitable type.
----------------
csigg wrote:
> I thought this wouldn't apply to std::function because it's only explicitly convertible to bool?
>
> https://stackoverflow.com/questions/66438225/how-should-i-check-whether-a-type-is-contextually-convertible-to-bool
You're right! I ran `ninja check-mlir` locally by force of habit, but this won't run the LLVM test...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123576/new/
https://reviews.llvm.org/D123576
More information about the llvm-commits
mailing list