<div dir="ltr">Naming wise, I'd be happy with isa<anyof<...>> or if we can't magic that, isa_anyof<...>.</div><br><div class="gmail_quote"><div dir="ltr">On Sat, May 20, 2017 at 8:56 PM Noel Grandin <<a href="mailto:noelgrandin@gmail.com">noelgrandin@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">isa_oneof? isa_anyof?<br><div class="gmail_quote"><div dir="ltr">On Sun, 21 May 2017 at 01:57, Sanjoy Das via Phabricator <<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">sanjoy added a comment.<br>
<br>
In <a href="https://reviews.llvm.org/D33125#760296" rel="noreferrer" target="_blank">https://reviews.llvm.org/D33125#760296</a>, @chandlerc wrote:<br>
<br>
> Another high-level comment: I don't like the name `isoneof`. To me, that parses to the relationship being tested `is` rather than `isa` which loses an important distinction. I'm not really sure what would be the best name though.<br>
<br>
<br>
One possibility is to figure out the C++ to make code like this work:<br>
<br>
  if (isa<oneof<T0, T1, T2>>(X))<br>
    ...;<br>
<br>
That's a bit more verbose, but we can read `oneof<T0, T1, T2>` as a sum type of `T0`, `T1` and `T2`.  I'd even be up for calling it `sum` or `sumty`, but not sure how others feel about that.<br>
<br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
<a href="https://reviews.llvm.org/D33125" rel="noreferrer" target="_blank">https://reviews.llvm.org/D33125</a><br>
<br>
<br>
<br>
</blockquote></div>
</blockquote></div>