luau/EqSat/include/Luau/Id.h

33 lines
570 B
C
Raw Normal View History

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
{
explicit Id(uint32_t id);
2024-07-19 18:21:40 +01:00
explicit operator uint32_t() const;
2024-07-19 18:21:40 +01:00
bool operator==(Id rhs) const;
bool operator!=(Id rhs) const;
bool operator<(Id rhs) const;
2024-07-19 18:21:40 +01:00
private:
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;
};