Pārlūkot izejas kodu

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

skypjack 5 mēneši atpakaļ
vecāks
revīzija
3587eaed9a
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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);
     }