nngn
Loading...
Searching...
No Matches
handle.h
Go to the documentation of this file.
1#ifndef NNGN_GRAPHICS_VULKAN_HANDLE_H
2#define NNGN_GRAPHICS_VULKAN_HANDLE_H
3
4#include <cstdint>
5#include <type_traits>
6
7namespace nngn {
8
19struct Handle {
20 std::uint64_t id;
21 Handle() = default;
22 Handle(std::uint64_t id_) : id(id_) {}
23 operator std::uint64_t() const { return this->id; }
24};
25
26static_assert(sizeof(Handle) == sizeof(std::uint64_t));
27static_assert(alignof(Handle) == alignof(std::uint64_t));
28static_assert(std::is_standard_layout_v<Handle>);
29
30}
31
32#endif
Definition audio.cpp:7
Base class for strongly-typed handles in 32-bit platforms.
Definition handle.h:19
Handle(std::uint64_t id_)
Definition handle.h:22
std::uint64_t id
Definition handle.h:20
Handle()=default