Prefer `try_emplace` over `insert` for maps
This will sometimes generate better code, never generate worse code, and has a slightly better interface (no more {}
).
Additionally, move the local std::string
into the key instead of copying.
This will sometimes generate better code, never generate worse code, and has a slightly better interface (no more {}
).
Additionally, move the local std::string
into the key instead of copying.