You've defined the same function twice; what do you expect to
happen? The compiler finds SomeNamespace::operator==
with
unqualified name lookup, and ::operator==
with ADL. Since
both have exactly the same signature, there is no way for the
compiler to choose one over the other.
As a general rule, overloaded operators for a type should be defined in the same namespace as the type, and no where else. (If the overloaded operator takes two different types, defined in two different namespaces, I'd put the operator in the global namespace. But such cases are rare.)