ilya-biryukov added inline comments.
================ Comment at: clangd/Function.h:36 + template <class Callable> + UniqueFunction(Callable Func) + : CallablePtr(llvm::make_unique< ---------------- sammccall wrote: > Do you want this constructor to be explicit? > > If not, I think you should be able to simplify the callsites in ClangdServer.h Thanks for spotting this. I think implicit works fine here. `std::function` also has implicit constructors. Simplified the callsites. ================ Comment at: clangd/Function.h:117 + +/// Creates an object that stores a callable (\p F) and first arguments to the +/// callable (\p As) and allows to call \p F with \Args at a later point. ---------------- sammccall wrote: > I find these "first arg" APIs a bit awkward, and can lead to writing > confusing APIs for easier binding. Not sure there's a good alternative, > though. Yeah. Works just like `std::bind`, though. And I would be very happy to remove that particular function altogether when we'll be able to use lambda initializer in LLVM codebase. https://reviews.llvm.org/D38627 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits