<div dir="ltr"><div>Thanks!<br><br></div>LMB<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 23, 2013 at 4:59 PM, Namespace <span dir="ltr"><<a href="mailto:rswhite4@googlemail.com" target="_blank">rswhite4@googlemail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Friday, 23 August 2013 at 19:57:42 UTC, Leandro Motta Barros wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello!<br>
<br>
Is it possible to make an InExpression work with a used-defined type?<br>
<br>
struct MyCollection { ... }<br>
<br>
MyCollection mc;<br>
<br>
auto p = 123 in mc;<br>
if (p) { ... }<br>
<br>
Thanks!<br>
<br>
LMB<br>
</blockquote>
<br></div></div>
Yes, use opBinaryRight:<br>
<br>
T* opBinaryRight(stirng op : "in")(...)<br>
</blockquote></div><br></div>