Skip to content

Commit

Permalink
fix MSVC most vexing parse
Browse files Browse the repository at this point in the history
  • Loading branch information
sbiscigl committed Aug 29, 2024
1 parent 433e820 commit 72c54d3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/aws/crt/StringView.h
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,9 @@ namespace std
const Aws::Crt::basic_string_view<CharT, Traits> &val) const noexcept
{
auto str = std::basic_string<CharT, Traits>(val.data(), val.size());
return std::hash<std::basic_string<CharT, Traits>>()(str);
using str_type = std::basic_string<CharT, Traits>;
using hash_type = std::hash<str_type>;
hash_type strHash;
return strHash.operator()(str);
}
} // namespace std

0 comments on commit 72c54d3

Please sign in to comment.