aboutsummaryrefslogtreecommitdiffstats
path: root/include/api-test/handle.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/api-test/handle.hpp')
-rw-r--r--include/api-test/handle.hpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/api-test/handle.hpp b/include/api-test/handle.hpp
index 2355191..956739d 100644
--- a/include/api-test/handle.hpp
+++ b/include/api-test/handle.hpp
@@ -6,5 +6,7 @@ template<typename T>
struct handle {
uint32_t id = handle::invalid_handle;
+ [[nodiscard]] inline bool is_valid() const { return id != handle::invalid_handle; }
+
static constexpr uint32_t invalid_handle = -1;
};