STL vector

John Love-Jensen eljay@adobe.com
Mon Oct 31 12:17:00 GMT 2005


Hi marcel,

Doing a pop_back on an empty std::vector has undefined effect.

Probably a safe bet that whatever the undefined effect, it isn't a desirable
effect.

The size method can be called before the pop_back, to assure that there is
something to pop.

HTH,
--Eljay



More information about the Gcc-help mailing list