From 26483acacbae00df3023a5e98e26b5532ad86db4 Mon Sep 17 00:00:00 2001 From: Mingxin Wang Date: Wed, 3 Jul 2024 10:54:17 +0800 Subject: [PATCH] Move direction semantics from dispatches to conventions (#125) * Move direction semantics from dispatches to conventions * Resolve comments * Reorder macros * Resolve comments --- proxy.h | 982 +++++++++++++------------------ tests/proxy_creation_tests.cpp | 1 - tests/proxy_dispatch_tests.cpp | 11 +- tests/proxy_invocation_tests.cpp | 29 +- tests/proxy_reflection_tests.cpp | 8 +- tests/proxy_traits_tests.cpp | 20 +- tests/utils.h | 1 + 7 files changed, 444 insertions(+), 608 deletions(-) diff --git a/proxy.h b/proxy.h index d826ef8..2efa126 100644 --- a/proxy.h +++ b/proxy.h @@ -27,10 +27,6 @@ #define ___PRO_ENFORCE_EBO #endif // defined(_MSC_VER) && !defined(__clang__) -#define ___PRO_DIRECT_FUNC_IMPL(...) \ - noexcept(noexcept(__VA_ARGS__)) requires(requires { __VA_ARGS__; }) \ - { return __VA_ARGS__; } - namespace pro { enum class constraint_level { none, nontrivial, nothrow, trivial }; @@ -66,6 +62,8 @@ struct add_qualifier_traits : std::type_identity {}; template using add_qualifier_t = typename add_qualifier_traits::type; +template +using add_qualifier_ptr_t = std::remove_reference_t>*; template