Function meta_any

Summary

#include <src/entt/meta/meta.hpp>

(1) meta_any()

(2) template <typename Type, typename... Args>
    explicit meta_any(std::in_place_type_t< Type >, Args &&...args)

(3) template <typename Type, typename = std::enable_if_t<!std::is_same_v<std::decay_t<Type>, meta_any>>>
    meta_any(Type &&value)

(4) meta_any(const meta_any &other)=default

(5) meta_any(meta_any &&other)

Function overload

Synopsis

#include <src/entt/meta/meta.hpp>

meta_any()

Description

Default constructor.

Source

Lines 200-203 in src/entt/meta/meta.hpp.

meta_any() ENTT_NOEXCEPT
    : storage{},
      node{},
      vtable{&basic_vtable<void>} {}

Synopsis

#include <src/entt/meta/meta.hpp>

template <typename Type, typename... Args>
explicit meta_any(std::in_place_type_t< Type >, Args &&...args)

Description

Constructs a wrapper by directly initializing the new object.

Template Parameters

Type - Type of object to use to initialize the wrapper.

Args - Types of arguments to use to construct the new instance.

Parameters

args - Parameters to use to construct the instance.

Source

Lines 211-215 in src/entt/meta/meta.hpp.

template<typename Type, typename... Args>
explicit meta_any(std::in_place_type_t<Type>, Args &&...args)
    : storage{std::in_place_type<Type>, std::forward<Args>(args)...},
      node{internal::meta_node<std::remove_cv_t<std::remove_reference_t<Type>>>::resolve()},
      vtable{&basic_vtable<std::remove_cv_t<std::remove_reference_t<Type>>>} {}

Synopsis

#include <src/entt/meta/meta.hpp>

template <typename Type, typename = std::enable_if_t<!std::is_same_v<std::decay_t<Type>, meta_any>>>
meta_any(Type &&value)

Description

Constructs a wrapper from a given value.

Template Parameters

Type - Type of object to use to initialize the wrapper.

Parameters

value - An instance of an object to use to initialize the wrapper.

Source

Lines 222-224 in src/entt/meta/meta.hpp.

template<typename Type, typename = std::enable_if_t<!std::is_same_v<std::decay_t<Type>, meta_any>>>
meta_any(Type &&value)
    : meta_any{std::in_place_type<std::remove_cv_t<std::remove_reference_t<Type>>>, std::forward<Type>(value)} {}

Synopsis

#include <src/entt/meta/meta.hpp>

meta_any(const meta_any &other)=default

Description

Copy constructor.

Parameters

other - The instance to copy from.

Source

Line 230 in src/entt/meta/meta.hpp.

Synopsis

#include <src/entt/meta/meta.hpp>

meta_any(meta_any &&other)

Description

Move constructor.

Parameters

other - The instance to move from.

Source

Lines 236-239 in src/entt/meta/meta.hpp.

meta_any(meta_any &&other) ENTT_NOEXCEPT
    : storage{std::move(other.storage)},
      node{std::exchange(other.node, nullptr)},
      vtable{std::exchange(other.vtable, &basic_vtable<void>)} {}





Add Discussion

Log in to comment