meta: minor changes
This commit is contained in:
@@ -477,8 +477,8 @@ public:
|
||||
if constexpr(std::is_reference_v<Type> && !std::is_const_v<std::remove_reference_t<Type>>) {
|
||||
return meta_any{meta_ctx_arg, *ctx};
|
||||
} else {
|
||||
auto target = internal::resolve<std::remove_cv_t<std::remove_reference_t<Type>>>(internal::meta_context::from(*ctx));
|
||||
return allow_cast(meta_type{*ctx, target});
|
||||
auto other = internal::resolve<std::remove_cv_t<std::remove_reference_t<Type>>>(internal::meta_context::from(*ctx));
|
||||
return allow_cast(meta_type{*ctx, other});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -489,13 +489,8 @@ public:
|
||||
*/
|
||||
template<typename Type>
|
||||
bool allow_cast() {
|
||||
auto target = internal::resolve<std::remove_cv_t<std::remove_reference_t<Type>>>(internal::meta_context::from(*ctx));
|
||||
|
||||
if constexpr(std::is_reference_v<Type> && !std::is_const_v<std::remove_reference_t<Type>>) {
|
||||
return allow_cast(meta_type{*ctx, target}) && (storage.data() != nullptr);
|
||||
} else {
|
||||
return allow_cast(meta_type{*ctx, target});
|
||||
}
|
||||
auto other = internal::resolve<std::remove_cv_t<std::remove_reference_t<Type>>>(internal::meta_context::from(*ctx));
|
||||
return allow_cast(meta_type{*ctx, other}) && (!(std::is_reference_v<Type> && !std::is_const_v<std::remove_reference_t<Type>>) || storage.data() != nullptr);
|
||||
}
|
||||
|
||||
/*! @copydoc any::emplace */
|
||||
|
||||
Reference in New Issue
Block a user