Simen kjaeraas:

> With floating-point numbers, the above solution does not always work.

The type is known at compile time, so you can split the algorithm in two with a 
"static if", and do something else if it's an integral type.

Bye,
bearophile

Reply via email to