diff --git a/libs/ecs/include/psemek/ecs/handle.hpp b/libs/ecs/include/psemek/ecs/handle.hpp index 2a8b64c1..dc596300 100644 --- a/libs/ecs/include/psemek/ecs/handle.hpp +++ b/libs/ecs/include/psemek/ecs/handle.hpp @@ -14,6 +14,16 @@ namespace psemek::ecs friend bool operator == (handle const &, handle const &) = default; friend auto operator <=> (handle const &, handle const &) = default; + + static handle null() + { + return {-1, -1}; + } + + explicit operator bool() const + { + return (*this) != null(); + } }; inline std::ostream & operator << (std::ostream & out, handle const & handle)