|
|
@@ -387,8 +387,8 @@ public:
|
|
|
*/
|
|
|
template<auto Setter, auto Getter, typename Policy = as_is_t>
|
|
|
meta_factory data(const id_type id) noexcept {
|
|
|
- using data_type = std::invoke_result_t<decltype(Getter), Type &>;
|
|
|
- static_assert(Policy::template value<data_type>, "Invalid return type for the given policy");
|
|
|
+ using descriptor = meta_function_helper_t<Type, decltype(Getter)>;
|
|
|
+ static_assert(Policy::template value<typename descriptor::return_type>, "Invalid return type for the given policy");
|
|
|
|
|
|
if constexpr(std::is_same_v<decltype(Setter), std::nullptr_t>) {
|
|
|
base_type::data(
|
|
|
@@ -397,7 +397,7 @@ public:
|
|
|
/* this is never static */
|
|
|
internal::meta_traits::is_const,
|
|
|
0u,
|
|
|
- &internal::resolve<std::remove_cv_t<std::remove_reference_t<data_type>>>,
|
|
|
+ &internal::resolve<std::remove_cv_t<std::remove_reference_t<typename descriptor::return_type>>>,
|
|
|
&meta_arg<type_list<>>,
|
|
|
&meta_setter<Type, Setter>,
|
|
|
&meta_getter<Type, Getter, Policy>});
|
|
|
@@ -410,7 +410,7 @@ public:
|
|
|
/* this is never static nor const */
|
|
|
internal::meta_traits::is_none,
|
|
|
1u,
|
|
|
- &internal::resolve<std::remove_cv_t<std::remove_reference_t<data_type>>>,
|
|
|
+ &internal::resolve<std::remove_cv_t<std::remove_reference_t<typename descriptor::return_type>>>,
|
|
|
&meta_arg<type_list<type_list_element_t<static_cast<std::size_t>(args_type::size != 1u), args_type>>>,
|
|
|
&meta_setter<Type, Setter>,
|
|
|
&meta_getter<Type, Getter, Policy>});
|