Quellcode durchsuchen

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

skypjack vor 5 Monaten
Ursprung
Commit
3587eaed9a
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  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.
      * @brief Returns true if an object is valid, false otherwise.
      * @return True if the 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);
         return (node != nullptr);
     }
     }