meta: decouple meta_prop_node and meta_type_node
This commit is contained in:
@@ -82,7 +82,7 @@ public:
|
||||
template<typename... Value>
|
||||
meta_factory prop(id_type key, Value &&...value) {
|
||||
(*container)[key] = internal::meta_prop_node{
|
||||
internal::meta_node<std::decay_t<Value>>::resolve()...,
|
||||
&internal::meta_node<std::decay_t<Value>>::resolve...,
|
||||
std::forward<Value>(value)...};
|
||||
|
||||
return *this;
|
||||
|
||||
@@ -669,7 +669,7 @@ struct meta_prop {
|
||||
* @return A wrapper containing the value stored with the property.
|
||||
*/
|
||||
[[nodiscard]] meta_any value() const {
|
||||
return (node && node->type) ? node->type->from_void(nullptr, node->value.data()) : meta_any{};
|
||||
return (node && node->type) ? node->type()->from_void(nullptr, node->value.data()) : meta_any{};
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -46,7 +46,7 @@ enum class meta_traits : std::uint32_t {
|
||||
struct meta_type_node;
|
||||
|
||||
struct meta_prop_node {
|
||||
meta_type_node *type{nullptr};
|
||||
meta_type_node *(*type)() noexcept {nullptr};
|
||||
basic_any<0u> value{};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user