Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorYuri Gorshenin <y@maps.me>2016-03-11 17:58:38 +0300
committerSergey Yershov <yershov@corp.mail.ru>2016-03-23 16:53:01 +0300
commit596b740b358d51e0614acafcb9eacb32386035e0 (patch)
treee97705684000e0a57d97d1c15990ebf119724a56 /base
parent63fb4b6c76961f4b924fb3e9edc84055ed635d22 (diff)
Review fixes.
Diffstat (limited to 'base')
-rw-r--r--base/stl_helpers.hpp9
1 files 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 <bool isField, typename T, typename C>
struct Comparer;
@@ -50,9 +52,10 @@ void SortUnique(std::vector<T> & 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<int, int>::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<int,
+// int>::second).
template <typename T, typename C>
impl::Comparer<true, T, C> CompareBy(T(C::*p))
{