Преглед изворни кода

meta: deprecate meta_type::operator bool, meta types are never invalid

skypjack пре 7 месеци
родитељ
комит
3587eaed9a
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/entt/meta/meta.hpp

+ 1 - 1
src/entt/meta/meta.hpp

@@ -1521,7 +1521,7 @@ public:
      * @brief Returns true if an object is valid, false otherwise.
      * @return True if the object is valid, false otherwise.
      */
-    [[nodiscard]] explicit operator bool() const noexcept {
+    [[deprecated("empty meta types are never invalid, and they match void instead")]] [[nodiscard]] explicit operator bool() const noexcept {
         return (node != nullptr);
     }