[PATCH] D117114: [llvm][ADT] Implement `BitVector(std::initializer_list)`

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 17 13:21:57 PST 2022


dblaikie added a comment.



> In D117114#3239411 <https://reviews.llvm.org/D117114#3239411>, @dblaikie wrote:
>
>> Re: the ambiguity: We could pre-empt that in a separate commit by making the ctor "explicit" - honestly I think we shouldn't be using {} to call user-defined ctors that aren't representative of/"Feel like" conversions. (wouldn't mind that as a broad style statement for LLVM and/or in the form of "mark multi-arg ctors explicit unless they're intentionally converting/structural constructors".
>
> Maybe I'm misunderstanding you, but the existing constructor already is marked as `explicit` and that doesn't make brace initialization invalid. Did you have something else in mind?

Right right - nevermind me there. Not sure what I was thinking. Thanks for the correction.

I don't have super strong feelings here - but yeah, does seem a bit close. What're the other APIs like by comparison that @dexonsmith has in mind/is suggesting as alternatives? Maybe a quick summary of how similar operations are spelled with different APIs might be good to consider what way we should go.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117114



More information about the llvm-commits mailing list