diff --git a/proxy.h b/proxy.h index 84e6586..30e124d 100644 --- a/proxy.h +++ b/proxy.h @@ -1413,39 +1413,13 @@ ___PRO_ASSIGNMENT_OP_DISPATCH_IMPL(>>=) ___PRO_BINARY_OP_DISPATCH_IMPL(,) ___PRO_BINARY_OP_DISPATCH_IMPL(->*) -#undef ___PRO_ASSIGNMENT_OP_DISPATCH_IMPL -#undef ___PRO_DEF_RHS_ASSIGNMENT_OP_ACCESSOR -#undef ___PRO_DEF_LHS_ASSIGNMENT_OP_ACCESSOR -#undef ___PRO_BINARY_OP_DISPATCH_IMPL -#undef ___PRO_EXTENDED_BINARY_OP_DISPATCH_IMPL -#undef ___PRO_RHS_OP_DISPATCH_IMPL -#undef ___PRO_DEF_RHS_OP_ACCESSOR -#undef ___PRO_LHS_OP_DISPATCH_IMPL -#undef ___PRO_LHS_ALL_OP_DISPATCH_BODY_IMPL -#undef ___PRO_LHS_BINARY_OP_DISPATCH_BODY_IMPL -#undef ___PRO_LHS_UNARY_OP_DISPATCH_BODY_IMPL -#undef ___PRO_LHS_LEFT_OP_DISPATCH_BODY_IMPL -#undef ___PRO_DEF_LHS_ALL_OP_ACCESSOR -#undef ___PRO_DEF_LHS_BINARY_OP_ACCESSOR -#undef ___PRO_DEF_LHS_UNARY_OP_ACCESSOR -#undef ___PRO_DEF_LHS_ANY_OP_ACCESSOR -#undef ___PRO_DEF_LHS_LEFT_OP_ACCESSOR - -#define ___PRO_DEF_BRACKETS_OP_ACCESSOR(Q, SELF, ...) \ - template \ - struct accessor { \ - R __VA_ARGS__ (Args... args) Q { \ - return proxy_invoke(access_proxy(SELF), \ - std::forward(args)...); \ - } \ - } template <> struct operator_dispatch<"()", false> { template decltype(auto) operator()(T&& self, Args&&... args) ___PRO_DIRECT_FUNC_IMPL( std::forward(self)(std::forward(args)...)) - ___PRO_DEF_MEM_ACCESSOR_TEMPLATE(___PRO_DEF_BRACKETS_OP_ACCESSOR, operator()) + ___PRO_DEF_MEM_ACCESSOR_TEMPLATE(___PRO_DEF_LHS_ANY_OP_ACCESSOR, operator()) }; template <> struct operator_dispatch<"[]", false> { @@ -1459,9 +1433,26 @@ struct operator_dispatch<"[]", false> { decltype(auto) operator()(T&& self, Arg&& arg) ___PRO_DIRECT_FUNC_IMPL(std::forward(self)[std::forward(arg)]) #endif // defined(__cpp_multidimensional_subscript) && __cpp_multidimensional_subscript >= 202110L - ___PRO_DEF_MEM_ACCESSOR_TEMPLATE(___PRO_DEF_BRACKETS_OP_ACCESSOR, operator[]) + ___PRO_DEF_MEM_ACCESSOR_TEMPLATE(___PRO_DEF_LHS_ANY_OP_ACCESSOR, operator[]) }; -#undef ___PRO_DEF_BRACKETS_OP_ACCESSOR + +#undef ___PRO_ASSIGNMENT_OP_DISPATCH_IMPL +#undef ___PRO_DEF_RHS_ASSIGNMENT_OP_ACCESSOR +#undef ___PRO_DEF_LHS_ASSIGNMENT_OP_ACCESSOR +#undef ___PRO_BINARY_OP_DISPATCH_IMPL +#undef ___PRO_EXTENDED_BINARY_OP_DISPATCH_IMPL +#undef ___PRO_RHS_OP_DISPATCH_IMPL +#undef ___PRO_DEF_RHS_OP_ACCESSOR +#undef ___PRO_LHS_OP_DISPATCH_IMPL +#undef ___PRO_LHS_ALL_OP_DISPATCH_BODY_IMPL +#undef ___PRO_LHS_BINARY_OP_DISPATCH_BODY_IMPL +#undef ___PRO_LHS_UNARY_OP_DISPATCH_BODY_IMPL +#undef ___PRO_LHS_LEFT_OP_DISPATCH_BODY_IMPL +#undef ___PRO_DEF_LHS_ALL_OP_ACCESSOR +#undef ___PRO_DEF_LHS_BINARY_OP_ACCESSOR +#undef ___PRO_DEF_LHS_UNARY_OP_ACCESSOR +#undef ___PRO_DEF_LHS_ANY_OP_ACCESSOR +#undef ___PRO_DEF_LHS_LEFT_OP_ACCESSOR #define ___PRO_DEF_CONVERSION_ACCESSOR(Q, SELF, ...) \ template \