[PATCH] D70620: [CommandLine] Add callbacks to Options

Don Hinton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 4 22:45:14 PST 2019


hintonda marked an inline comment as done.
hintonda added inline comments.


================
Comment at: llvm/include/llvm/Support/CommandLine.h:477
+
+  cb(std::function<void(const Ty &)> CB) : CB(CB) {}
+
----------------
MaskRay wrote:
> Is the constructor needed? Can the call site below (`cb<Ty>(CB);`) just use aggregate initialization?
I'm not sure I understand your question, but I've added function_traits to static_asserts to make it easier for callers to use and do the right thing.  Please let me know if that addresses your concerns.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70620





More information about the llvm-commits mailing list