src: Fix compile error with gcc-4.7

This commit is contained in:
Tatsuhiro Tsujikawa 2015-12-01 21:21:50 +09:00
parent e01d213636
commit cbad05e0de
1 changed files with 5 additions and 0 deletions

View File

@ -1244,8 +1244,13 @@ int read_mime_types(std::map<std::string, std::string> &res,
break;
}
ext_end = std::find_if(ext_start, std::end(line), delim_pred);
#ifdef HAVE_STD_MAP_EMPLACE
res.emplace(std::string(ext_start, ext_end),
std::string(std::begin(line), type_end));
#else // !HAVE_STD_MAP_EMPLACE
res.insert(std::make_pair(std::string(ext_start, ext_end),
std::string(std::begin(line), type_end)));
#endif // !HAVE_STD_MAP_EMPLACE
}
}