try_emplace overloads
Declared in <cptr/ordered_map.hpp>
If key is absent, insert it with a value built from args; otherwise do nothing, and leave args untouched. Returns the element with that key and whether it was inserted. Strong guarantee.
template<class... Args>
std::pair<iterator, bool>
try_emplace(
K const& key,
Args&&... args);
» more...
As above, moving key into the map only if it is inserted, so move-only keys work.
template<class... Args>
std::pair<iterator, bool>
try_emplace(
K&& key,
Args&&... args);
» more...
try_emplace() with a hint, which is not used.
template<class... Args>
iterator
try_emplace(
const_iterator,
K const& key,
Args&&... args);
» more...
try_emplace() with a hint, which is not used, moving key.
template<class... Args>
iterator
try_emplace(
const_iterator,
K&& key,
Args&&... args);
» more...