meta_func::meta is no longer available

This commit is contained in:
Michele Caini
2019-10-03 14:20:00 +02:00
parent 21810f3b39
commit cf0e4d24a1
2 changed files with 9 additions and 21 deletions

View File

@@ -690,9 +690,6 @@ public:
&helper_type::arg,
[](meta_handle handle, meta_any *any) {
return internal::invoke<Type, Candidate, Policy>(handle, any, std::make_index_sequence<helper_type::size>{});
},
[]() ENTT_NOEXCEPT -> meta_func {
return &node;
}
};

View File

@@ -17,7 +17,6 @@ namespace entt {
class meta_any;
class meta_handle;
class meta_prop;
class meta_func;
class meta_type;
@@ -99,7 +98,6 @@ struct meta_func_node {
meta_type_node *(* const ret)() ENTT_NOEXCEPT;
meta_type_node *(* const arg)(size_type) ENTT_NOEXCEPT;
meta_any(* const invoke)(meta_handle, meta_any *);
meta_func(* const meta)() ENTT_NOEXCEPT;
};
@@ -1311,21 +1309,16 @@ inline bool operator!=(const meta_data &lhs, const meta_data &rhs) ENTT_NOEXCEPT
* A meta function is an opaque container for a member function associated with
* a given type.
*/
class meta_func {
/*! @brief A meta factory is allowed to create meta objects. */
template<typename> friend class meta_factory;
meta_func(const internal::meta_func_node *curr) ENTT_NOEXCEPT
: node{curr}
{}
public:
struct meta_func {
/*! @brief Unsigned integer type. */
using size_type = typename internal::meta_func_node::size_type;
/*! @brief Default constructor. */
meta_func() ENTT_NOEXCEPT
: node{nullptr}
/**
* @brief Constructs an instance from a given node.
* @param curr The underlying node with which to construct the instance.
*/
meta_func(const internal::meta_func_node *curr = nullptr) ENTT_NOEXCEPT
: node{curr}
{}
/**
@@ -1762,7 +1755,7 @@ public:
std::enable_if_t<std::is_invocable_v<Op, meta_func>, void>
func(Op op) const ENTT_NOEXCEPT {
internal::iterate<&internal::meta_type_node::func>([op = std::move(op)](auto *curr) {
op(curr->meta());
op(meta_func{curr});
}, node);
}
@@ -1777,11 +1770,9 @@ public:
* @return The meta function associated with the given identifier, if any.
*/
meta_func func(const ENTT_ID_TYPE identifier) const ENTT_NOEXCEPT {
const auto * const curr = internal::find_if<&internal::meta_type_node::func>([identifier](auto *candidate) {
return internal::find_if<&internal::meta_type_node::func>([identifier](auto *candidate) {
return candidate->identifier == identifier;
}, node);
return curr ? curr->meta() : meta_func{};
}
/**