Please see the code below. I have use there const template types. The first line compiles, the other two don't. Why those two don't compile? And the first one which compiles - is it OK to write it? What is the difference of std::map<const int, const bool>
and std::map<int, bool>
?
std::map<const int, const bool> mm;
std::map<const int&, const bool> mm;
std::map<const int, const bool&> mm;
I know that this is a strange question but please help to clarify it.