On 7/15/2010 9:22 PM, Don Clugston wrote:
On 16 July 2010 01:04, David Simcha<[email protected]>  wrote:
So is everyone on board for this?  If not, please say something.  Otherwise
I'll make the changes.
It won't work. sqrt is a compiler intrinsic, and can't be changed to a
template without modifying the compiler.

(Smacks hand against forehead.) I realized that right after I sent that message. I guess the options are, then:

1. Modify the compiler. I guess the easiest way would be to rename the sqrt() intrinsic to sqrtImpl() and have a function called sqrt() in std.math that forwards to sqrtImpl().

2. Live with it for now. It's an extremely annoying bug in that math-heavy code runs into it constantly, but it's an easy bug to work around.

3. Get rid of sqrt(float). Walter, or whoever put it there in the first place: Why is it there? Do we really need it?

4. Make explicit overloads for every single numeric type. This is ugly but do-able and would definitely be a 100% solution.
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

Reply via email to