diff --git a/src/entt/entity/handle.hpp b/src/entt/entity/handle.hpp index 444c3514b..75fc99e09 100644 --- a/src/entt/entity/handle.hpp +++ b/src/entt/entity/handle.hpp @@ -335,7 +335,7 @@ public: * entity. */ template - [[nodiscard]] operator basic_handle() const noexcept { + operator basic_handle() const noexcept { static_assert(std::is_same_v || std::is_same_v, Registry>, "Invalid conversion between different handles"); static_assert((sizeof...(Scope) == 0 || ((sizeof...(Args) != 0 && sizeof...(Args) <= sizeof...(Scope)) && ... && (type_list_contains_v, Args>))), "Invalid conversion between different handles"); return owner ? basic_handle{*owner, entt} : basic_handle{};