cptr::detail::basic_ordered_map::emplace

Build the element from args, then insert it unless its key is present; returns the element with that key and whether it was inserted. As for std::map, the element is built first, even when the key turns out to be present (try_emplace avoids that). If the comparison or an allocation throws, the element is destroyed and the map is unchanged.

Synopsis

Declared in <cptr/ordered_map.hpp>

template<class... Args>
requires std::constructible_from<value_type, Args...>
std::pair<iterator, bool>
emplace(Args&&... args);