|
@@ -210,7 +210,7 @@ Among the few relevant differences, `meta_any` adds support for containers and
|
|
|
pointer-like types (see the following sections for more details), while `any`
|
|
pointer-like types (see the following sections for more details), while `any`
|
|
|
does not.<br/>
|
|
does not.<br/>
|
|
|
Similar to `any`, this class can also be used to create _aliases_ for unmanaged
|
|
Similar to `any`, this class can also be used to create _aliases_ for unmanaged
|
|
|
-objects either upon construction using `std::ref` and `std::cref` or from an
|
|
|
|
|
|
|
+objects either upon construction using `std::in_place_type<T &>` or from an
|
|
|
existing instance by means of the `as_ref` function. However, unlike `any`,
|
|
existing instance by means of the `as_ref` function. However, unlike `any`,
|
|
|
`meta_any` treats an empty instance and one initialized with `void` differently:
|
|
`meta_any` treats an empty instance and one initialized with `void` differently:
|
|
|
|
|
|
|
@@ -386,7 +386,7 @@ object for a sequence container:
|
|
|
|
|
|
|
|
```cpp
|
|
```cpp
|
|
|
std::vector<int> vec{1, 2, 3};
|
|
std::vector<int> vec{1, 2, 3};
|
|
|
-entt::meta_any any{std::ref(vec)};
|
|
|
|
|
|
|
+entt::meta_any any = std::make_meta_any<std::vector<int> &>(vec);
|
|
|
|
|
|
|
|
if(any.type().is_sequence_container()) {
|
|
if(any.type().is_sequence_container()) {
|
|
|
if(auto view = any.as_sequence_container(); view) {
|
|
if(auto view = any.as_sequence_container(); view) {
|