Browse Source

any: minor changes

skypjack 5 months ago
parent
commit
4a252bdb84
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/entt/core/any.hpp

+ 1 - 1
src/entt/core/any.hpp

@@ -465,7 +465,7 @@ public:
      * @return False if the two objects differ in their content, true otherwise.
      * @return False if the two objects differ in their content, true otherwise.
      */
      */
     [[nodiscard]] bool operator==(const basic_any &other) const noexcept {
     [[nodiscard]] bool operator==(const basic_any &other) const noexcept {
-        if(vtable && info() == other.info()) {
+        if(vtable && ((descriptor == other.descriptor) || has_value(other.info()))) {
             return (vtable(request::compare, *this, other.data()) != nullptr);
             return (vtable(request::compare, *this, other.data()) != nullptr);
         }
         }