diff options
| author | ladevieq <ladevie.quentin@gmail.com> | 2026-05-05 00:43:54 +0200 |
|---|---|---|
| committer | ladevieq <ladevie.quentin@gmail.com> | 2026-05-05 00:49:12 +0200 |
| commit | c3aac9026951e2a6e35e76b9c7d36e114a281453 (patch) | |
| tree | bdfc2ab5d5f1d196ba8c7a76371a29911f75913e /include/handle.hpp | |
| parent | 754249d9c652ef941e6b082d2e86538d15ba9434 (diff) | |
Remove old api and move api-test content to src and include dirs
Diffstat (limited to 'include/handle.hpp')
| -rw-r--r-- | include/handle.hpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/handle.hpp b/include/handle.hpp new file mode 100644 index 0000000..484b217 --- /dev/null +++ b/include/handle.hpp @@ -0,0 +1,13 @@ +#pragma once + +#include <cstdint> + +template<typename U> +struct handle { + uint32_t id = invalid_id; + uint32_t generation = 0U; + + [[nodiscard]] inline bool is_valid() const { return id != handle::invalid_id; } + + static constexpr uint32_t invalid_id = UINT32_MAX; +}; |
