I am getting a strange, Call to function 'Equals' that is neither visible in the template definition nor found by argument-dependent lookup, for a simple tag dispatch implementation.
template <typename T>
bool Equals(T lhs, T rhs){
return Equals(rhs, lhs, conditional_t<is_floating_point<T>::value, true_type, false_type>{});
}
template <typename T> // for floating
bool Equals(T lhs, T rhs, true_type){
return abs(lhs - rhs) < 0.01;
}
template <typename T> // for all the other
bool Equals(T lhs, T rhs, false_type){
return lhs == rhs;
}
what am I doing wrong?