Using opDispatch as *magic* getter/setter. Possible or not?

Aleksandar Ružičić ruzicic.aleksandar at gmail.com
Tue Apr 5 00:14:36 PDT 2011


On Tue, Apr 5, 2011 at 6:46 AM, Simen kjaeraas <simen.kjaras at gmail.com> wrote:
> Bug 620[1] is related to what you ask. I have written a solution there,
> but I do not remember how well it works, and have no way of testing it
> currently:
>
> template opDispatch( string name ) {
>    auto opDispatch( T... )( T args ) {
>        // Do something!
>    }
> }
>
> [1]: http://d.puremagic.com/issues/show_bug.cgi?id=620
>
> --
> Simen
>

Thank you, I will try your workaround.


More information about the Digitalmars-d-learn mailing list