From f2831b5f5ccf4524ab8aedd85197e1e1fc6cf594 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Wed, 20 Nov 2019 21:24:18 +0100 Subject: [PATCH] updated doc (close #363) --- docs/md/entity.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/md/entity.md b/docs/md/entity.md index 4cc86e9f2..74b4772ff 100644 --- a/docs/md/entity.md +++ b/docs/md/entity.md @@ -714,9 +714,11 @@ Similarly, the code shown below removes `a_type` from an entity whenever `my_type` is assigned to it: ```cpp -registry.on_construct().connect<&entt::registry::reset>(registry); +registry.on_construct().connect(&entt::registry::reset)>(registry); ``` +In this case, to prevent the _wrong_ overload for `reset` being selected, +`entt::overload` is used to help the compiler make the right choice.
A dependency can also be easily broken as follows: ```cpp