[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
Sat Apr 22 04:49:07 PDT 2023


jhuber6 added inline comments.


================
Comment at: libc/src/__support/CPP/functional.h:22
+/// A function type adapted from LLVM's function_ref type. This class does not
+/// own the callable, so it is not in general safe to store a function_ref.
+template <typename Fn> class function;
----------------
tschuett wrote:
> I am a bit confused by the naming. ISO C++ is going to call it std::function_ref.
It used to be called `cpp::function` and I'm basically copying `llvm::function_ref`, so I just changed the name for consistency.


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