I have a template function operating on a floating point argument. The function is templated so that a caller can use either float, double or any other floating point data type.
At one point in my code, I compare a value with zero (or any other floating-point constant). Should I use 0.0 or 0.0f for the comparison?
template<T> void f(T a){
  //  should I use 0.0 or 0.0f in the following line?
  if(a == 0.0){
  }
}
While this is not causing any problems at the moment, I'd like to know what the usual practice is.