Remove superflous std::hash specialization

This commit is contained in:
Dennis Luxen 2022-10-30 19:21:06 +01:00
parent d06b23d819
commit 274dcc58a5
2 changed files with 0 additions and 18 deletions

View File

@ -73,7 +73,6 @@ template <typename StringView> inline auto decompose(const StringView &lhs, cons
std::string str(view);
std::transform(
str.begin(), str.end(), str.begin(), [](unsigned char c) { return std::tolower(c); });
);
auto front = str.find_first_not_of(' ');
if (front == std::string::npos)

View File

@ -14,21 +14,4 @@ using StringView = std::string_view;
} // namespace util
} // namespace osrm
// Specializing hash<> for user-defined type in std namespace, this is standard conforming.
namespace std
{
template <> struct hash<::osrm::util::StringView> final
{
std::size_t operator()(::osrm::util::StringView v) const noexcept
{
// Bring into scope and call un-qualified for ADL:
// remember we want to be able to switch impl. above.
using std::begin;
using std::end;
return boost::hash_range(begin(v), end(v));
}
};
} // namespace std
#endif /* OSRM_STRING_VIEW_HPP */