[PATCH] D99560: Utility to construct visitors from lambdas.

Scott Linder via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 16 11:43:52 PDT 2021


scott.linder added a comment.

I tried to write a version in https://reviews.llvm.org/D100670 that perfectly-forwards each argument to the (overload resolution selected) constructor of the `remove_cvref` type of the argument. I ended up doing this after I had already started moving some other things out of STLExtras.h, so the patch currently depends on https://reviews.llvm.org/D100670 and https://reviews.llvm.org/D100669 but you can equally well ignore those and `makeVisitor` can land first.

I didn't put `makeVisitor` in a dedicated header, as it doesn't seem substantial enough to me, but I'm happy to move it out of STLExtras.h again.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99560



More information about the llvm-commits mailing list