[libc-commits] [PATCH] D148971: [libc] Adjust the `cpp:function` type to support lambdas

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon Apr 24 04:29:12 PDT 2023


jhuber6 added inline comments.


================
Comment at: libc/src/__support/CPP/functional.h:46
+      cpp::enable_if_t<cpp::is_void<Ret>::value ||
+                       cpp::is_convertible<decltype(cpp::declval<Callable>()(
+                                               cpp::declval<Params>()...)),
----------------
sivachandra wrote:
> As suggested on discord, can we just replace this with `__is_convertible`? Minimum clang version we support is 11 and gcc version 12.2: https://libc.llvm.org/compiler_support.html
Since I ended up writing it the more generic way I'm somewhat tempted to keep it, but I try to change it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148971/new/

https://reviews.llvm.org/D148971



More information about the libc-commits mailing list