antis81/libqgit2 — comment on commit 11591851835faf8362ad627a097ebbdb1df45b55
File:  line 0
By ropez:

Comparison operators are not required to be member functions. The reason the original code failed was not that the function was outside the class, but that it was not defined inside the namespace in the cpp file. I have wanted to fix this in all files since I started:

BAD:

using namespace LibQGit2;

// code

GOOD:

namespace LibQGit2
{

// code

}

Changing the cpp file like this would fix the problem, without moving the function inside the class. And I think declaring it outside the class is better (more "symmetric" because both object are passed as regular arguments)