doc: added a warning to registry::replace

This commit is contained in:
Michele Caini
2020-03-08 23:36:18 +01:00
parent 3e87788541
commit 58885854f1
2 changed files with 8 additions and 0 deletions

1
TODO
View File

@@ -18,6 +18,7 @@
Next:
* replace observer class with observer functions
* patch rather than replace, emplace rather then assign (when we have args... ofc)
* WIP:
- deprecate snapshot, loader, ...

View File

@@ -704,6 +704,13 @@ public:
* Temporary objects are returned for empty types though. Capture them by
* copy or by const reference if needed.
*
* @warning
* Attempting to use an invalid entity or to replace a component of an
* entity that doesn't own it results in undefined behavior.<br/>
* An assertion will abort the execution at runtime in debug mode in case of
* invalid entity or if the entity doesn't own an instance of the given
* component.
*
* @tparam Component Type of component to replace.
* @tparam Func Types of the function objects to invoke.
* @param entity A valid entity identifier.