feat(solver-bootstrap): step 3 — core-ids-and-diagnostics

This commit is contained in:
KOKO\Mimi
2026-07-30 13:01:15 +09:00
parent 3e44deed72
commit 34d21f43fe
10 changed files with 255 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
#pragma once
#include <compare>
#include <cstdint>
#include <stdexcept>
namespace fesa {
template <class Tag>
class EntityId final {
public:
explicit constexpr EntityId(const std::int64_t value) : value_{value} {
if (value < 0) {
throw std::invalid_argument{"EntityId value must not be negative."};
}
}
[[nodiscard]] constexpr std::int64_t value() const noexcept {
return value_;
}
auto operator<=>(const EntityId&) const = default;
private:
std::int64_t value_;
};
} // namespace fesa