03-14-2013 04:26 PM - edited 03-14-2013 04:32 PM
I had the same whenever using std:map<const std::string, std::string>. any idea? my SDK is 10.0.9.2372. And #include <string.h> doesn't help
03-14-2013 04:42 PM - edited 03-14-2013 04:45 PM
Marking the key as const isn't really needed. It can't be modified via map's public interface anyway.
I guess if map implementation uses assignment operator internally, then passing a constant key to it will not work. Maybe older implementation was using a copy constructor.
> >>From the C++ standard: > >> Table 69 in 23.1.2, p7, says that > >> X::key_type must be assignable;
From this discussion: