diff --git a/docs/md/core.md b/docs/md/core.md index c60df1daf..ae0f0dabb 100644 --- a/docs/md/core.md +++ b/docs/md/core.md @@ -282,6 +282,7 @@ int value = 42; entt::any any{std::in_place_type(value)}; entt::any cany = entt::make_any(value); +entt::any fwd = entt::forward_as_any(value); any.emplace(value); ``` diff --git a/docs/md/meta.md b/docs/md/meta.md index 53c99b3a2..541300a8c 100644 --- a/docs/md/meta.md +++ b/docs/md/meta.md @@ -210,9 +210,10 @@ Among the few relevant differences, `meta_any` adds support for containers and pointer-like types (see the following sections for more details), while `any` does not.
Similar to `any`, this class can also be used to create _aliases_ for unmanaged -objects either upon construction using `std::in_place_type` or from an -existing instance by means of the `as_ref` function. However, unlike `any`, -`meta_any` treats an empty instance and one initialized with `void` differently: +objects either with `forward_as_meta` or using the `std::in_place_type` +disambiguation tag, as well as from an existing object by means of the `as_ref` +member function. However, unlike `any`, `meta_any` treats an empty instance and +one initialized with `void` differently: ```cpp entt::meta_any empty{}; @@ -386,7 +387,7 @@ object for a sequence container: ```cpp std::vector vec{1, 2, 3}; -entt::meta_any any = std::make_meta_any &>(vec); +entt::meta_any any = entt::forward_as_meta(vec); if(any.type().is_sequence_container()) { if(auto view = any.as_sequence_container(); view) {