Quote Originally Posted by HighCommander4 View Post
But suppose you don't do any of those things? Suppose all you do is add elements to the vector using push_back()? Aren't member functions of template classes only instantiated if they're actually used? So shouldn't a piece of code that only calls push_back() compile even if the element type is not assignable?
No - it is a template which means the the requirements are the same for all types used to instantiate the vector. If an object is created on the stack and then passed to push_back, then the object has to be deep copied. I don't see what the big deal is. Vector isn't special. All sequence containers require the types to be assignable unless you are inserting pointers.