It might be better to use template specialization here, e.g.:

```c++
template <>
bool RangeCheck(float val) {
  return val > 0 && /* etc */;
}

template <>
bool RangeCheck(double val) {
  return true;
}
```