labath added a comment.

BTW, I was bored on the plane, so I created this proof of concept F10589216: 
dense.cc <https://reviews.llvm.org/F10589216>. It needs a lot of cleanup of 
course, but it demonstrates one way to generically store some extra data with 
some type. It gives each type the option to define a bunch of unused (the patch 
calls them "free") values (which can be useful for for Optional<>s, DenseMaps, 
etc.). Also each type can say that it is able to store some extra unrelated 
bits (like PointerIntPair does), and with a bit of care, one can even nest 
these types arbitrarily). the main thing I haven't yet figured out is the 
relationship with DenseMapInfo. Theoretically DenseMapInfo could be implemented 
on top of DenseInfo, but I am still wondering whether we could not make that a 
single type (trait) somehow...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69230



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to