mirror of
https://github.com/luau-lang/luau.git
synced 2025-04-04 10:50:54 +01:00
Add LanguageHash<std::vector<T>>
.
This commit is contained in:
parent
fd810237c3
commit
ba53dd03dc
1 changed files with 12 additions and 0 deletions
|
@ -434,4 +434,16 @@ struct LanguageHash<std::array<T, I>>
|
|||
}
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct LanguageHash<std::vector<T>>
|
||||
{
|
||||
size_t operator()(const std::vector<T>& vector) const
|
||||
{
|
||||
size_t seed = 0;
|
||||
for (const T& t : vector)
|
||||
hashCombine(seed, languageHash(t));
|
||||
return seed;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace Luau::EqSat
|
||||
|
|
Loading…
Add table
Reference in a new issue