casting int[] to bool[]
Steven Schveighoffer
schveiguy at yahoo.com
Fri Jan 30 06:55:48 PST 2009
"Don" wrote
> Steven Schveighoffer wrote:
>> This is such a common "mistake", and really more of an annoyance, I
>> wonder if it might be better if pow were switched to a template that
>> called the actual pow after casting the first argument to real. Often
>> times, one does not use reals as their variable type, and I seem to
>> recall this kind of error happens even with literals for both
>> arguments...
>>
>> Something like:
>>
>> real pow(T, U)(T t, U u)
>> {
>> return _pow(cast(real)t, u);
>> }
>>
>> -Steve
>
> It would be better. Please create a bugzilla report, and I'll fix it.
http://d.puremagic.com/issues/show_bug.cgi?id=2636
BTW, I assigned to the only Don in the list, not sure if that is you...
Please fix in Tango as well if you wouldn't mind ;)
-Steve
More information about the Digitalmars-d-learn
mailing list