Jul 14, 2014

[C++11] STL container, emplacement push_back


Quote from Effective Modern C++:
  • Emplacement functions are often more efficient than their insertion counter parts, and they’re never less efficient.
  • For containers of resource-managing objects, emplacement functions may suffer resource leaks that would not arise through use of insertion functions.
  • Emplacement functions may perform type conversions that would be rejectedby insertion functions.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.