Skip to content
Commit 8b805c91 authored by Howard Hinnant's avatar Howard Hinnant
Browse files

The rules for emplace in map, multimap, unordered_map and unordered_multimap...

The rules for emplace in map, multimap, unordered_map and unordered_multimap changed a while back and I'm just now updating to these new rules.  In a nutshell, you've got to know you're emplacing to a pair and use one of pair's constructors.  I made one extension:  If you want to emplace the key and default construct the mapped_type, you can just emplace(key), as opposed to emplace(piecewise_construct, forward_as_tuple(key), forward_as_tuple()).

llvm-svn: 157503
parent 7b298854
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment