[PATCH] D98477: [ADT] Add IntrusiveVariant, VariantTraits, and new STLForwardCompat

Scott Linder via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 14 16:29:40 PDT 2021


scott.linder added a comment.

Ping

I did try to write an `offsetof`-based version using inheritance instead of the "common initial sequence" rule, but I am not sure how to do the necessary checks statically. The best I can see to do would be to have some dynamic `ASSERT`s to confirm that casting the alternative type to the base type does not change the underlying representation (i.e. if both pointers are cast to `uintptr_t` they are equal).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98477



More information about the llvm-commits mailing list