Difference between emplace and push is c++ ?

Revision en1, by bully....maguire, 2020-01-12 18:07:41

Is there any performance difference between emplace and push ? Also according to stack overflow Link push stores copy of existing instance . Does that mean suppose i make a instance variable 'd' of class say Demo .If i push into stack then another variable pointing to same instance is pushed back or new copy of instance of 'd' is made and pushed back ?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English bully....maguire 2020-01-12 18:07:41 483 Initial revision (published)