opIndexDispatch?

Jonathan M Davis via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Oct 10 12:16:06 PDT 2016


On Monday, October 10, 2016 19:01:19 Yuxuan Shui via Digitalmars-d-learn 
wrote:
> Hi,
>
> Why is there no opIndexDispatch for overloading a[x].func() ?

There's opIndex for overloading a[x], and then you can call a function on
the return value. If you want some kind of opDispatch on the return value,
then the return type will need to implement opDispatch.

- Jonathan M Davis



More information about the Digitalmars-d-learn mailing list