meta: decouple meta_template_node and meta_type_node
This commit is contained in:
@@ -1115,7 +1115,7 @@ public:
|
||||
* @return The tag for the class template of the underlying type.
|
||||
*/
|
||||
[[nodiscard]] inline meta_type template_type() const noexcept {
|
||||
return node->templ.type;
|
||||
return node->templ.type ? node->templ.type() : nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -100,7 +100,7 @@ struct meta_template_node {
|
||||
using size_type = std::size_t;
|
||||
|
||||
size_type arity{0u};
|
||||
meta_type_node *type{nullptr};
|
||||
meta_type_node *(*type)() noexcept {nullptr};
|
||||
meta_type_node *(*arg)(const size_type) noexcept {nullptr};
|
||||
};
|
||||
|
||||
@@ -172,7 +172,7 @@ class ENTT_API meta_node {
|
||||
if constexpr(is_complete_v<meta_template_traits<Type>>) {
|
||||
return meta_template_node{
|
||||
meta_template_traits<Type>::args_type::size,
|
||||
meta_node<typename meta_template_traits<Type>::class_type>::resolve(),
|
||||
&meta_node<typename meta_template_traits<Type>::class_type>::resolve,
|
||||
+[](const std::size_t index) noexcept -> meta_type_node * { return meta_arg_node(typename meta_template_traits<Type>::args_type{}, index); }};
|
||||
} else {
|
||||
return meta_template_node{};
|
||||
|
||||
Reference in New Issue
Block a user