{"provider_url":"https://hatena.blog","width":"100%","categories":["C++"],"title":"\u30cc\u30eb\u7d42\u7aef\u6587\u5b57\u5217\u306estd::hash\u8a08\u7b97","author_url":"https://blog.hatena.ne.jp/yohhoy/","version":"1.0","description":"C++\u6a19\u6e96\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30cf\u30c3\u30b7\u30e5\u8a08\u7b97\u30d5\u30a1\u30f3\u30af\u30bfstd::hash\u3092\u7528\u3044\u3066\u30cc\u30eb\u7d42\u7aef\u6587\u5b57\u5217\u306e\u30cf\u30c3\u30b7\u30e5\u8a08\u7b97\u3092\u884c\u3046\u5834\u5408\u3001\u30dd\u30a4\u30f3\u30bf\u578b\u306b\u5bfe\u3059\u308bstd::hash<const char*>\u7279\u6b8a\u5316\u3067\u306f\u306a\u304fstd::hash<std::string_view>\u7279\u6b8a\u5316\u3092\u7528\u3044\u308b\u3002*1\u4e0b\u8a18\u30b3\u30fc\u30c9\u306b\u3042\u308bh0\u3067\u306f\u3001\u201c\u6587\u5b57\u5217\u201d \u304b\u3089\u3067\u306f\u306a\u304f\u30a2\u30c9\u30ec\u30b9\u5024\u304b\u3089\u30cf\u30c3\u30b7\u30e5\u8a08\u7b97\u3055\u308c\u3066\u3057\u307e\u3046\u3002*2 #include <cassert> #include <functional> #include <string_view> int main() { char str[] = \"Hello\"; // NG: \u610f\u56f3\u306b\u53cd\u3057\u3066\u30a2\u30c9\u30ec\u30b9\u5024\u304b\u3089\u30cf\u30c3\u30b7\u2026","type":"rich","blog_title":"yohhoy\u306e\u65e5\u8a18","blog_url":"https://yohhoy.hatenadiary.jp/","image_url":null,"provider_name":"Hatena Blog","author_name":"yohhoy","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyohhoy.hatenadiary.jp%2Fentry%2F20230221%2Fp1\" title=\"\u30cc\u30eb\u7d42\u7aef\u6587\u5b57\u5217\u306estd::hash\u8a08\u7b97 - yohhoy\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","published":"2023-02-21 00:00:00","height":"190","url":"https://yohhoy.hatenadiary.jp/entry/20230221/p1"}