With the following code (excerpted for brevity):
color.h:
class color { public: color(); enum colorType { black, blue, green, cyan,
The key is near the end: "discards qualifiers". getColorText is a const member function, so colors is const. But map::operator[]() is not const.
getColorText
const
colors
map::operator[]()