A solution to multiple opCasts
Jarrett Billingsley
kb3ctd2 at yahoo.com
Sun Apr 27 07:29:20 PDT 2008
"Simen Kjaeraas" <simen.kjaras at gmail.com> wrote in message
news:op.t98lo3nc1hx7vj at spill04.lan...
I was thinking of the plans for multiple opCasts today, when inspiration
suddenly struck me. What if opCast saved its return value in a reference
parameter of the appropriate type instead?
...
As we can see, the function call introduces a temporary value, which might
be
unwanted. Apart from that, I can't see any problems OTOH, but I'm sure
there are
some. Please do comment.
----------------------------
No offense, but the idea is not new ;) I'd imagine something like this
would have to be implemented for opImplicitCast, unless Walter special-cases
those and allows them to be overloaded on return type. Which is weird.
More information about the Digitalmars-d
mailing list