diff --git a/include/xxhash_str.h b/include/xxhash_str.h index 0f93cb0..a83321a 100644 --- a/include/xxhash_str.h +++ b/include/xxhash_str.h @@ -6,4 +6,5 @@ struct xxHashStringGen { XXH64_hash_t operator()(const std::string &str) const noexcept; XXH64_hash_t operator()(std::string_view &&str) const noexcept; + XXH64_hash_t operator()(std::string &&str) const noexcept; }; diff --git a/src/xxhash_str.cpp b/src/xxhash_str.cpp index 3a984aa..0917e48 100644 --- a/src/xxhash_str.cpp +++ b/src/xxhash_str.cpp @@ -5,6 +5,10 @@ XXH64_hash_t xxHashStringGen::operator()(const std::string &str) const noexcept return XXH3_64bits(str.data(), str.size()); } XXH64_hash_t xxHashStringGen::operator()(std::string_view &&str) const noexcept +{ + return XXH3_64bits(str.data(), str.size()); +} +XXH64_hash_t xxHashStringGen::operator()(std::string &&str) const noexcept { return XXH3_64bits(str.data(), str.size()); } \ No newline at end of file