diff --git a/base/stl_helpers.hpp b/base/stl_helpers.hpp index 916989a040..f4f3ca3b97 100644 --- a/base/stl_helpers.hpp +++ b/base/stl_helpers.hpp @@ -7,6 +7,8 @@ namespace my { namespace impl { +// When isField is true, Comparer operates on a pointers-to-field. +// Otherwise, Comparer operates on a pointers-to-const-method. template struct Comparer; @@ -50,9 +52,10 @@ void SortUnique(std::vector & v) } // Creates a comparer being able to compare two instances of class C -// (given by reference or pointer) by a field of C. For example, to -// create comparer that is able to compare pairs of ints by second -// component, it's enough to call CompareBy(&pair::second). +// (given by reference or pointer) by a field or const method of C. +// For example, to create comparer that is able to compare pairs of +// ints by second component, it's enough to call CompareBy(&pair::second). template impl::Comparer CompareBy(T(C::*p)) {