Przeglądaj źródła

registry: rule of five

Michele Caini 1 rok temu
rodzic
commit
c885044ce4
1 zmienionych plików z 9 dodań i 0 usunięć
  1. 9 0
      src/entt/entity/registry.hpp

+ 9 - 0
src/entt/entity/registry.hpp

@@ -344,6 +344,9 @@ public:
         rebind();
     }
 
+    /*! @brief Default copy constructor, deleted on purpose. */
+    basic_registry(const basic_registry &) = delete;
+
     /**
      * @brief Move constructor.
      * @param other The instance to move from.
@@ -359,6 +362,12 @@ public:
     /*! @brief Default destructor. */
     ~basic_registry() noexcept = default;
 
+    /**
+     * @brief Default copy assignment operator, deleted on purpose.
+     * @return This mixin.
+     */
+    basic_registry &operator=(const basic_registry &) = delete;
+
     /**
      * @brief Move assignment operator.
      * @param other The instance to move from.