First use alias this go "import" functionality transparently. Then use
opImplicitCast to set what can be implicitly casted to.
On 04 Apr 2014 12:45 PM, "Dmitry Olshansky" <dmitry.o...@gmail.com> wrote:
> 04-Apr-2014 13:16, Walter Bright пишет:
>> On 4/4/2014 12:23 AM, Rory McGuire wrote:
>>> On Fri, Apr 4, 2014 at 9:05 AM, Walter Bright <
>>> <mailto:newshou...@digitalmars.com>> wrote:
>>> You can disable the implicit conversion to int with this scheme.
>>> The alias
>>> this only takes effect if there is no other member that will take
>>> the operation.
>>> What is the exact method of disabling the implicit cast? I had a look
>>> after you
>>> sent your last mail. Didn't find anything in the spec.
>> It's supposed to be by adding your own opImplicitCast overload, but that
>> isn't implemented yet.
> The difference between opImplictCast and alias this being ... ?
> Dmitry Olshansky