From 1bbde25ab7f58a1a60b1a3cdfe1a7ed02e63b02c Mon Sep 17 00:00:00 2001 From: Mingxin Wang Date: Sat, 16 May 2026 22:13:07 +0800 Subject: [PATCH 1/2] Swap 'Skill Extensions' and 'Dispatch Extensions' --- include/proxy/v4/proxy.h | 773 ++++++++++++++++++++------------------- 1 file changed, 387 insertions(+), 386 deletions(-) diff --git a/include/proxy/v4/proxy.h b/include/proxy/v4/proxy.h index 2b26da3..5dada74 100644 --- a/include/proxy/v4/proxy.h +++ b/include/proxy/v4/proxy.h @@ -2130,119 +2130,413 @@ using facade_builder = details::invalid_size, details::invalid_cl, details::invalid_cl, details::invalid_cl>; + // ============================================================================= -// == Skill Extensions (skills::rtti, skills::format, etc.) == +// == Dispatch Extensions (operator_dispatch, weak_dispatch, etc.) == // ============================================================================= -#if __cpp_rtti >= 199711L -class bad_proxy_cast : public std::bad_cast { -public: - char const* what() const noexcept override { - return "pro::v4::bad_proxy_cast"; +namespace details { + +template +struct sign { + consteval sign(const char (&str)[N + 1]) { + if (str[N] != '\0') { + PROD_UNREACHABLE(); + } + for (std::size_t i = 0; i < N; ++i) { + value[i] = str[i]; + } } -}; -#endif // __cpp_rtti >= 199711L -namespace details { + char value[N]; +}; +template +sign(const char (&str)[N]) -> sign; -template