2024-07-19 18:21:40 +01:00
|
|
|
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstddef>
|
2024-11-15 19:37:29 +00:00
|
|
|
#include <cstdint>
|
2024-07-19 18:21:40 +01:00
|
|
|
#include <functional>
|
|
|
|
|
|
|
|
namespace Luau::EqSat
|
|
|
|
{
|
|
|
|
|
|
|
|
struct Id final
|
|
|
|
{
|
2024-11-08 18:43:24 +00:00
|
|
|
explicit Id(uint32_t id);
|
2024-07-19 18:21:40 +01:00
|
|
|
|
2024-11-08 18:43:24 +00:00
|
|
|
explicit operator uint32_t() const;
|
2024-07-19 18:21:40 +01:00
|
|
|
|
|
|
|
bool operator==(Id rhs) const;
|
|
|
|
bool operator!=(Id rhs) const;
|
|
|
|
|
2024-11-08 18:43:24 +00:00
|
|
|
bool operator<(Id rhs) const;
|
|
|
|
|
2024-07-19 18:21:40 +01:00
|
|
|
private:
|
2024-11-08 18:43:24 +00:00
|
|
|
uint32_t id;
|
2024-07-19 18:21:40 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Luau::EqSat
|
|
|
|
|
|
|
|
template<>
|
|
|
|
struct std::hash<Luau::EqSat::Id>
|
|
|
|
{
|
|
|
|
size_t operator()(Luau::EqSat::Id id) const;
|
|
|
|
};
|