const std::map<int, int> constMap = { {1,1}, {2,2 } };
Or take a const map copy-constructed from from a non-const map, if you wish.How is this not immutable data, and "only provides a read-only view"?
It is linguistically guaranteed to be non-mutating - const-casts excepted of course.
All languages that are constructing const data types on the fly are putting them in a writeable pages in memory, after all.