From 596b740b358d51e0614acafcb9eacb32386035e0 Mon Sep 17 00:00:00 2001 From: Yuri Gorshenin Date: Fri, 11 Mar 2016 17:58:38 +0300 Subject: [PATCH] Review fixes. --- base/stl_helpers.hpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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)) {