|
|
@@ -76,7 +76,9 @@ public:
|
|
|
* @param allocator The allocator to use.
|
|
|
*/
|
|
|
emitter(emitter &&other, const allocator_type &allocator) noexcept
|
|
|
- : handlers{container_type{std::move(other.handlers.first()), allocator}, allocator} {}
|
|
|
+ : handlers{container_type{std::move(other.handlers.first()), allocator}, allocator} {
|
|
|
+ ENTT_ASSERT(alloc_traits::is_always_equal::value || handlers.second() == other.handlers.second(), "Copying an emitter is not allowed");
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* @brief Move assignment operator.
|
|
|
@@ -84,6 +86,8 @@ public:
|
|
|
* @return This dispatcher.
|
|
|
*/
|
|
|
emitter &operator=(emitter &&other) noexcept {
|
|
|
+ ENTT_ASSERT(alloc_traits::is_always_equal::value || handlers.second() == other.handlers.second(), "Copying an emitter is not allowed");
|
|
|
+
|
|
|
handlers = std::move(other.handlers);
|
|
|
return *this;
|
|
|
}
|