Talk:cpp/container/map/emplace

The overloads are missing? 50.202.91.130 06:55, 27 August 2014 (PDT)


 * Which overloads? --Nate (talk) 08:47, 5 September 2014 (PDT)


 * I believe they were referring to the pair constructor overloads that were mentioned in the example by number. --Cubbi (talk) 09:13, 5 September 2014 (PDT)

"The element may be constructed even if there already is an element with the key in the container, in which case it will be destroyed immediately." The last "it" is a bit misleading, and I had to try it out to discover that this is the first element that is referred to which is really destroyed --JulienF (talk) 05:55, 20 August 2016 (PDT)
 * changed "it" to "the newly constructed element", does this work? --Cubbi (talk) 06:28, 20 August 2016 (PDT)
 * Perfect. Thanks a lot --JulienF (talk) 00:10, 23 August 2016 (PDT)

Default constructors, and constructors taking more than one element
Can we give an example such as the following, which is clearer about the issues of default constructor, and constructor with multiple elements:

Thanks. Fdklsa (talk) 01:25, 17 January 2017 (PST)


 * first and third emplaces from this example are already in the current example. You can default-construct in-place just by executing, although I suppose for a multimap you'd have to use the move constructor or this overly-verbose emplace (or try_emplace, which is better in every way). Maybe there could be a usage note on avoiding moves. --Cubbi (talk) 03:09, 17 January 2017 (PST)