lawrence_danna added a comment.

In D69230#1717364 <https://reviews.llvm.org/D69230#1717364>, @labath wrote:

>




> The thing I would like to see here is to have this behaviour be configurable 
> via a traits argument of the Optional class, similarly to how DenseMap allows 
> the type to specify default traits by specialising DenseMapInfo (I recommend 
> taking a look at that for inspiration/consistency),

So that would mean actually adding the Info class as a template parameter to 
Optional, right?   It looks like that would be quite disruptive, as there's 
other headers that predeclare Optional as taking only a single template 
parameter.

I'm not sure I understand what the advantage of having that extra level of 
customization would be.    Are there situations where `OptionalInfo<Foo>`  is 
specialized  in `Foo.h`, but some other code is going to want to use its own 
Info struct to customize `Foo` optionals?    I can see how you'd want that for 
maps, because different code has different requirements for their maps, even 
with the same key types.   But it seems like for Optionals there's probably one 
right way to make an `Optional<T>` for each `T`.


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