diff --git a/include/proxy/v5/detail/core.h b/include/proxy/v5/detail/core.h index 0a25174..e2b7f67 100644 --- a/include/proxy/v5/detail/core.h +++ b/include/proxy/v5/detail/core.h @@ -1567,15 +1567,10 @@ struct converter { struct accessor { \ PRO5D_GEN_DEBUG_SYMBOL_FOR_MEM_ACCESSOR(operator T) \ explicit(Expl) operator T() oq ne { \ - if constexpr (Nullable) { \ - if (!static_cast(*this).has_value()) { \ - return nullptr; \ - } \ - } \ return invoke(static_cast

(*this)); \ } \ } -template +template struct cast_dispatch_base { PRO5D_DEF_ACCESSOR_TEMPLATE( MEM, PRO5D_DEF_CAST_ACCESSOR, diff --git a/include/proxy/v5/detail/dispatch.h b/include/proxy/v5/detail/dispatch.h index 98dc5c3..771676b 100644 --- a/include/proxy/v5/detail/dispatch.h +++ b/include/proxy/v5/detail/dispatch.h @@ -264,13 +264,13 @@ struct operator_dispatch<"[]", false> { #undef PRO5D_DEF_LHS_UNARY_OP_ACCESSOR #undef PRO5D_DEF_LHS_LEFT_OP_ACCESSOR -struct implicit_conversion_dispatch : detail::cast_dispatch_base { +struct implicit_conversion_dispatch : detail::cast_dispatch_base { template PRO5D_STATIC_CALL(T&&, T&& self) noexcept { return std::forward(self); } }; -struct explicit_conversion_dispatch : detail::cast_dispatch_base { +struct explicit_conversion_dispatch : detail::cast_dispatch_base { template PRO5D_STATIC_CALL(auto, T&& self) noexcept { return detail::converter{