I have the following code:
std::string s("abcdef");
std::string::iterator first = s.begin();
char c1 = *first; // this works
std::make_pair<char, int>(*first, 1); // this doesn't work
So when I dereference the string iterator to a standard char, it works fine. However when I use it directly in a std::make_pair
call, it doesn't seem to work. What is the reason for this?
Thank you.