Since you are using auto to declare variables saving the return value of mismatch, it could be replaced with the return type of said function. According to this, this would be
std::pair<InputIt1,InputIt2>.
In your first use this would mean InputIt1=InputIt2=std::string::iterator(the return type of std::string::begin) and the result type should be std::pair
In your second it would be the return type of std::string::rbegin():
std::pair<std::string::reverse_iterator,std::string::reverse_iterator>
I hope this helps, but it is of course rather tedious to enter such long typenames and auto should, imho, be prefered, so if you can use a more modern compiler(or pass the right flags to your current one(-std=c++11 for g++ for instance)), i suggest you do so.