"operator" overloading?
Simon
s.d.hammett at gmail.com
Wed Feb 23 13:07:42 PST 2011
On 23/02/2011 19:56, Jonathan M Davis wrote:
>
> You can overload the cast operator in D:
>
> T opCast(T)() {...}
>
> but it's for explicit cast only. There is not currently any way to do implicit
> casts with an overloaded operator. You have to use alias this for that, which
> may or may not do what be what you want if you want an implicit cast.
>
> - Jonathan M Davis
thanks for the info; and Dmitry.
--
My enormous talent is exceeded only by my outrageous laziness.
http://www.ssTk.co.uk
More information about the Digitalmars-d-learn
mailing list