No $ for op overloads?

Jarrett Billingsley jarrett.billingsley at gmail.com
Fri Sep 4 22:43:53 PDT 2009


On Sat, Sep 5, 2009 at 1:31 AM, Nick Sabalausky<a at a.a> wrote:
> I made a simple struct that overloads opIndex and opSlice, and also exposed
> a "length" property. But when I try to use $ on it, I got:
>
> Error: undefined identifier __dollar
>
> I tried making a property "__dollar" that just returned "length", but that
> didn't change anything.
>
> What's going on? Any ideas?

Nope, it's never been possible. :(

You can do silly things like defining a global __dollar, but it's
useless since it can't take params.


More information about the Digitalmars-d-learn mailing list