doc: added more details
This commit is contained in:
@@ -215,11 +215,12 @@ const bool equal = (any == other);
|
||||
Also, `meta_any` adds support for containers and pointer-like types (see the
|
||||
following sections for more details).<br/>
|
||||
Similar to `any`, this class can also be used to create _aliases_ for unmanaged
|
||||
objects. However, unlike `any`,` meta_any` treats an empty instance and one
|
||||
initialized with `void` differently:
|
||||
objects either upon construction using `std::ref` 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:
|
||||
|
||||
```cpp
|
||||
entt::meta_any any{};
|
||||
entt::meta_any empty{};
|
||||
entt::meta_any other{std::in_place_type<void>};
|
||||
```
|
||||
|
||||
|
||||
@@ -320,8 +320,15 @@ circle c;
|
||||
drawable d{std::ref(c)};
|
||||
```
|
||||
|
||||
In this case, although the interface of the `poly` object doesn't change, it
|
||||
won't construct any element or take care of destroying the referenced object.
|
||||
Similarly, it's possible to create non-owning copies of `poly` from an existing
|
||||
object:
|
||||
|
||||
```cpp
|
||||
drawable other = as_ref(d);
|
||||
```
|
||||
|
||||
In both cases, although the interface of the `poly` object doesn't change, it
|
||||
won't construct any element or take care of destroying the referenced objects.
|
||||
|
||||
Note also how the underlying concept is accessed via a call to `operator->` and
|
||||
not directly as `d.draw()`.<br/>
|
||||
|
||||
Reference in New Issue
Block a user