Commit Graph

3 Commits

Author SHA1 Message Date
Pekka Enberg
5418e32fc7 map_difference: Simplify difference value
Simplify the return value of map_difference() to return set of keys.
This makes it possible to use the function with value types such as
foreign_ptr<> that are non-copyable.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-06-03 09:19:00 +03:00
Pekka Enberg
a388b088c6 map_difference: Parametrize value comparison
If map value type is lw_shared_ptr<T>, for example, we need to be able
to pass our own value comparison function to the difference() function.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-05-27 16:22:13 +03:00
Pekka Enberg
a264f42bd6 Add map_difference::difference() helper
This implements Maps.difference() helper function in C++. We need it to
translate various Origin call-sites that use it. The implementation is
written from scratch with Guava code used as reference to preserve
semantics.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-05-12 10:19:52 +03:00