STL containers holding pointers

This is about the discussion started here http://www.cplusplus.com/forum/lounge/81411/
I'm making a new thread as I don't know if it's a good thing to go that much off topic

A vector that holds raw pointers to dynamic memory is not exception safe (unless, say, those pointers are also held by some other object controlling the lifetime of the pointed to memory which is exception safe.) The usual solution is to wrap those pointers in an object (such as std::unique_ptr) which is exception safe.

I'd like to know if the same applies to std::map (I guess it does, but just to be sure)
If someone feels like explaining it I'd like more info on the matter, or a link to some article you think is good

Thanks
Last edited on
Topic archived. No new replies allowed.