Container requirements have changed from C++03 to C++11. While C++03 had blanket requirements (e.g. copy constructibility and assignability for vector), C++11 defines fine-g
Update
Under the accepted (and correct) answer I commented in 2011:
Bottom line: We didn't design containers to hold
const T. Though I did give it some thought. And we came really close to doing it by accident. To the best of my knowledge, the current sticking point is the pair of overloadedaddressmember functions in the default allocator: WhenTisconst, these two overloads have the same signature. An easy way to correct this would be to specializestd::allocatorand remove one of the overloads.
With the upcoming C++17 draft it appears to me that we have now legalized vector, and I also believe we've done it accidentally. :-)
P0174R0 removes the address overloads from std::allocator. P0174R0 makes no mention of supporting std::allocator as part of its rationale.
Correction
In the comments below T.C. correctly notes that the address overloads are deprecated, not removed. My bad. The deprecated members don't show up in in 20.10.9 where the std::allocator is defined, but are instead relegated to section D.9. I neglected to scan Chapter D for this possibility when I posted this.
Thank you T.C. for the correction. I contemplated deleting this misleading answer, but perhaps it is best to leave it up with this correction so that perhaps it will keep someone else from misreading the spec in the same way I did.