mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Schwartzmeyer <and...@schwartzmeyer.com>
Subject Re: Review Request 56363: Stout: Add predicate `find` semantics to `hashmap`.
Date Wed, 08 Feb 2017 21:09:06 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56363/
-----------------------------------------------------------

(Updated Feb. 8, 2017, 9:09 p.m.)


Review request for mesos, Alex Clemmer and Joseph Wu.


Changes
-------

Remove patch dependency (there is none).


Bugs: MESOS-6892
    https://issues.apache.org/jira/browse/MESOS-6892


Repository: mesos


Description
-------

`Option<Value> hashmap::findIf(lambda::function<bool(Value)> predicate)`
filters `hashmap` values given a predicate (for more advanced kinds of
`Value`, say compare structs on a field).

`bool hashmap::containsIf(lambda::function<bool(Value)> predicate)`
checks whether a `Value` matching predicate exists in the `hashmap`
(just passes to `findIf` and acts like `hashmap::contains`).


Diffs
-----

  3rdparty/stout/include/stout/hashmap.hpp 539bbfd9250f2f372c2b3211e2379ad2229fa35e 

Diff: https://reviews.apache.org/r/56363/diff/


Testing
-------


Thanks,

Andrew Schwartzmeyer


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message