Forráskód Böngészése

registry: rule of five

Michele Caini 1 éve
szülő
commit
c885044ce4
1 módosított fájl, 9 hozzáadás és 0 törlés
  1. 9 0
      src/entt/entity/registry.hpp

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

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