meta: decouple meta_prop_node and meta_type_node

This commit is contained in:
Michele Caini
2022-08-23 18:55:08 +02:00
parent 53f2bb7701
commit f0b10965fb
3 changed files with 3 additions and 3 deletions

View File

@@ -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;

View File

@@ -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{};
}
/**

View File

@@ -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{};
};