Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions include/proxy/v5/detail/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -1567,15 +1567,10 @@ struct converter {
struct accessor<P, D, T() oq ne> { \
PRO5D_GEN_DEBUG_SYMBOL_FOR_MEM_ACCESSOR(operator T) \
explicit(Expl) operator T() oq ne { \
if constexpr (Nullable) { \
if (!static_cast<const P&>(*this).has_value()) { \
return nullptr; \
} \
} \
return invoke<D, T() oq ne>(static_cast<P pq>(*this)); \
} \
}
template <bool Expl, bool Nullable>
template <bool Expl>
struct cast_dispatch_base {
PRO5D_DEF_ACCESSOR_TEMPLATE(
MEM, PRO5D_DEF_CAST_ACCESSOR,
Expand Down
4 changes: 2 additions & 2 deletions include/proxy/v5/detail/dispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<false, false> {
struct implicit_conversion_dispatch : detail::cast_dispatch_base<false> {
template <class T>
PRO5D_STATIC_CALL(T&&, T&& self) noexcept {
return std::forward<T>(self);
}
};
struct explicit_conversion_dispatch : detail::cast_dispatch_base<true, false> {
struct explicit_conversion_dispatch : detail::cast_dispatch_base<true> {
template <class T>
PRO5D_STATIC_CALL(auto, T&& self) noexcept {
return detail::converter{
Expand Down
Loading