2024-07-19 10:21:40 -07: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-08 11:56:23 -08:00
|
|
|
#include <cstdint>
|
2024-07-19 10:21:40 -07:00
|
|
|
#include <functional>
|
|
|
|
|
|
|
|
namespace Luau::EqSat
|
|
|
|
{
|
|
|
|
|
|
|
|
struct Id final
|
|
|
|
{
|
2024-11-08 10:43:24 -08:00
|
|
|
explicit Id(uint32_t id);
|
2024-07-19 10:21:40 -07:00
|
|
|
|
2024-11-08 10:43:24 -08:00
|
|
|
explicit operator uint32_t() const;
|
2024-07-19 10:21:40 -07:00
|
|
|
|
|
|
|
bool operator==(Id rhs) const;
|
|
|
|
bool operator!=(Id rhs) const;
|
|
|
|
|
2024-11-08 10:43:24 -08:00
|
|
|
bool operator<(Id rhs) const;
|
|
|
|
|
2024-07-19 10:21:40 -07:00
|
|
|
private:
|
2024-11-08 10:43:24 -08:00
|
|
|
uint32_t id;
|
2024-07-19 10:21:40 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Luau::EqSat
|
|
|
|
|
|
|
|
template<>
|
|
|
|
struct std::hash<Luau::EqSat::Id>
|
|
|
|
{
|
|
|
|
size_t operator()(Luau::EqSat::Id id) const;
|
|
|
|
};
|