It is possible to extend the comparators with templates matching custom types, but this is a non-trivial task and requires a good knowledge of C++.