How use "toHash" without cast
Alex Rønne Petersen
alex at lycus.org
Wed Jun 20 15:32:41 PDT 2012
On 21-06-2012 00:31, Namespace wrote:
> hello, iI have written a template vector class. Now I need to rewrite
> the tohash function in dependence to the coords. But i have no clue
> because it doesn't allow any casts or convertions, because its a
> @trusted method.
> Because of that i cannot override toHash for float, real or double.
> Any ideas?
I don't really understand the problem. I think you need to show some code.
@trusted doesn't actually affect whether you can cast or convert anything.
--
Alex Rønne Petersen
alex at lycus.org
http://lycus.org
More information about the Digitalmars-d-learn
mailing list