string::size_typeをautoにしてあります。
ちなみにsize_typeにした場合は問題なくコンパイルされました。
環境はMingw5.1.6のg++コンパイラです。
ファイル名はerror.cppです。
#include <iostream>
#include <string>
using namespace std;
int main(){
string str = "abcdefgh";
auto it = str.find('a');
return 0;
}