Hi there,
what is the difference between const vector<const MyType> and const
vector<MyType>?
A vector< MyType const > (const or not) invokes undefined behavior since
MyType const does not satisfy the Assignable requirement for containers. On
the other hand, vector<MyType> has this problem only if MyType does not
satisfy the requirements. If you have a good STL implementation, something
like vector< MyType const > might not even compile since concept checks
would fail.
As for const vector<X>, well, it's const: you can only call const methods on
it, which implies that you cannot change the contents of the vector after
construction (which leaves the constructor taking a range of two iterators
as the only interesting way of creating such a critter).
Best
Kai-Uwe Bux