diff --git a/src/entt/meta/meta.hpp b/src/entt/meta/meta.hpp index 40ebd542f..a197e3e93 100644 --- a/src/entt/meta/meta.hpp +++ b/src/entt/meta/meta.hpp @@ -475,7 +475,7 @@ public: */ template [[nodiscard]] meta_any allow_cast() const { - if constexpr(!std::is_reference_v || !std::is_const_v>) { + if constexpr(!std::is_reference_v || std::is_const_v>) { if(storage.has_value>>()) { return as_ref(); } else if(*this) {