const vector<const string>
Let's say I have a vector of strings of the name of each month declared and defined in the global scope. The vector is to be used by a lot of parts of the application. I want it the values to be constant, what kind of const should I use?
The type of the element of a sequence container must be at least MoveAssignable, several operation require that it also must be CopyAssignable
Therefore, std::vector<const std::string> is badly formed.
The logical state of a sequence container includes the state of the elements which makes up the sequence; so in a const std::vector<std::string>, the container itself (vector) as well as the elements it contains (strings) are immutable.