opIndexDispatch?

Marc Schütz via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Oct 14 02:09:33 PDT 2016


On Thursday, 13 October 2016 at 01:09:06 UTC, Ali Çehreli wrote:
> On 10/10/2016 12:01 PM, Yuxuan Shui wrote:
>> Hi,
>>
>> Why is there no opIndexDispatch for overloading a[x].func() ?
>
> I could not understand the question fully but would using an 
> element proxy work?
>

I assume a proxy would indeed work, but it's indeed inconsistent. 
A proxy would work for opIndexAssign() and friends as well, so 
why do they exist, when opIndexDispatch() doesn't?


More information about the Digitalmars-d-learn mailing list