#include <cmath>
#include <iostream>

using namespace std;

template<typename ValueType>
decltype(ValueType{} == ValueType{}) Compare(const ValueType& value, const ValueType& expected)
{
  return value == expected;
}

template<>
decltype(float{} == float{}) Compare<float>(const float& value, const float& expected)
{
  return std::abs(value - expected) < 1e-4F;
}

int main() {
  float foo = 13.0F;
  float bar = 42.0F;

  cout << Compare(foo, bar) << endl;
}