MCPcopy Create free account
hub / github.com/apache/impala / EmplaceOrUpdate

Function EmplaceOrUpdate

be/src/gutil/map-util.h:473–478  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

471// map, its value is changed to the given "value" and false is returned.
472template <class Collection>
473bool EmplaceOrUpdate(Collection* const collection,
474 const typename Collection::key_type& key,
475 typename Collection::mapped_type&& value) {
476 return collection->insert_or_assign(
477 key, std::forward<typename Collection::mapped_type>(value)).second;
478}
479
480// Given the key and parameters to construct the mapped object in-place,
481// EmplaceOrDie() returns reference to the mapped object for dictionary-like

Callers 1

TESTFunction · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68