[PATCH] D99561: Support visitor pattern by PointerUnion.

Bakhtiyar Neyman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 30 15:36:31 PDT 2021


bakhtiyarneyman added a comment.

Thanks for taking a look, Mehdi and David! PTAL.

David, it was a goal to try to keep the API similar to std::variant. The biggest difference is that std::visit is a static function that accepts variable number of variants. I never experienced a need for that and replaced it with a non-static method (less verbose, more idiomatic, less complex). In my mind this API difference is insignificant, and the APIs are similar enough, but maybe when you say similar you mean something different?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99561



More information about the llvm-commits mailing list