11-03-2012 06:47 AM
12-13-2012 03:17 AM
To solve this include both
#include <string.h>
#include <string>
Cheers!
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
@robinhuang,
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.
UPD:
> >>From the C++ standard: > >> Table 69 in 23.1.2, p7, says that > >> X::key_type must be assignable;
From this discussion: