MCPcopy Create free account
hub / github.com/Dobiasd/FunctionalPlus / map_keep

Function map_keep

include/fplus/maps.hpp:409–416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

407// Also known as pick.
408template <typename MapType, typename KeyContainer>
409MapType map_keep(const KeyContainer& keys, const MapType& map)
410{
411 static_assert(std::is_same<
412 typename KeyContainer::value_type,
413 typename MapType::key_type>::value,
414 "Key types do not match.");
415 return map_keep_if(bind_2nd_of_2(is_elem_of<KeyContainer>, keys), map);
416}
417
418// API search type: map_drop : ([key], Map key val) -> Map key val
419// fwd bind count: 1

Callers 1

maps_test.cppFile · 0.50

Calls 2

map_keep_ifFunction · 0.70
bind_2nd_of_2Function · 0.70

Tested by

no test coverage detected