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?




Reply With Quote
