How do you check if a container in C++ supports the equality operator?
So basically, I want to implement a generic equality checking function which looks like this
template <class C>
bool operator==(const C& c1, const C& c2) {
return c1 == c2;
}
And I want to allow this function to work only on classes which have the equality operator defined. Is there any way to check for the presence of the equality operator in a class?