[Cs3] emplace

Mikhail Nesterenko mikhail at cs.kent.edu
Thu Feb 11 16:34:43 EST 2021


CS3 students,

emplace() is a C++11 mechanism of creating a space for the
object-element in the container and invoking a constructor on it with
the arguments supplied to the emplace()

I updated the slides (added slide 24) and created an example that
demonstrates the operation of emplace() here:

   http://www.cs.kent.edu/~mikhail/classes/cs3/Examples/STLContainersSequential/Vectors/emplace.cpp

We'll briefly talk about it during the next lecture.

Thanks,
-- 
Mikhail


More information about the cs3 mailing list