This is a consequence of declaring operators in the wrong namespaces. They must be where ADL can find them, so the one for
std::pair
would need to be in namespace std
(which is illegal, therefore your idea is impossible to achieve).