From 3d604757533f5efe953fd9917a814c4371834895 Mon Sep 17 00:00:00 2001 From: koe Date: Thu, 15 Dec 2022 13:04:34 -0600 Subject: [PATCH] comment updates --- src/common/container_helpers.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/container_helpers.h b/src/common/container_helpers.h index cd74b1ada..6ac94b51a 100644 --- a/src/common/container_helpers.h +++ b/src/common/container_helpers.h @@ -54,7 +54,7 @@ struct equals_from_less final template bool operator()(const T &a, const T &b) { return !(a < b) && !(b < a); } }; -/// note: uniqueness uses 'equals_from_less' to match the use of operator< when testing if sorted +/// note: test for sorted and uniqueness using the same criteria (operator<) template bool is_sorted_and_unique(const T& container) { @@ -67,6 +67,8 @@ bool is_sorted_and_unique(const T& container) return true; } /// convenience wrapper for checking if a mapped object is mapped to a key embedded in that object +/// example: std::unorderd_map> where the map key is supposed to +/// reproduce the pair's rct::key; use the predicate to get the pair's rct::key element template bool keys_match_internal_values(const std::unordered_map &map, const std::function<