<p dir="ltr">First use alias this go "import" functionality transparently. Then use opImplicitCast to set what can be implicitly casted to. </p>
<div class="gmail_quote">On 04 Apr 2014 12:45 PM, "Dmitry Olshansky" <<a href="mailto:dmitry.olsh@gmail.com">dmitry.olsh@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
04-Apr-2014 13:16, Walter Bright пишет:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 4/4/2014 12:23 AM, Rory McGuire wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Fri, Apr 4, 2014 at 9:05 AM, Walter Bright <<a href="mailto:newshound2@digitalmars.com" target="_blank">newshound2@digitalmars.com</a><br>
<mailto:<a href="mailto:newshound2@digitalmars.com" target="_blank">newshound2@<u></u>digitalmars.com</a>>> wrote:<br>
<br>
    You can disable the implicit conversion to int with this scheme.<br>
The alias<br>
    this only takes effect if there is no other member that will take<br>
the operation.<br>
<br>
What is the exact method of disabling the implicit cast? I had a look<br>
after you<br>
sent your last mail. Didn't find anything in the spec.<br>
</blockquote>
<br>
It's supposed to be by adding your own opImplicitCast overload, but that<br>
isn't implemented yet.<br>
</blockquote>
<br>
The difference between opImplictCast and alias this being ... ?<br>
<br>
-- <br>
Dmitry Olshansky<br>
</blockquote></div>