c++ - STL containers element destruction order -
does iso c++ standard mandate sort of destruction order of objects inside stl containers?
- are
std::list
/std::vector
/std::map
elements destroyed starting beginning or end of container? - can rely on
std::map
storing elements instd::pair
s internally key in pair destroyed before value (or vice versa)?
- unspecified in standard.
- yes, means key destroyed after associated value.
Comments
Post a Comment