diff --git a/include/cserver/server/handlers/http_handler_base.hpp b/include/cserver/server/handlers/http_handler_base.hpp index 12a199c..3dd9b85 100644 --- a/include/cserver/server/handlers/http_handler_base.hpp +++ b/include/cserver/server/handlers/http_handler_base.hpp @@ -43,7 +43,19 @@ struct HTTPHandlerBase { co_await stream.Close(); }; inline constexpr HTTPHandlerBase(auto, auto&) {}; - +}; +template +struct HTTPHandlerAdder { + template + static consteval auto Adder(const auto& context) { + return HTTPHandlerBase::template Adder(context); + }; +}; +template +struct HTTPHandlerBaseWithAdder : HTTPHandlerBase, HTTPHandlerAdder { + inline constexpr HTTPHandlerBaseWithAdder(auto name, auto& context) : + HTTPHandlerBase(name, context), + HTTPHandlerAdder{} {}; }; } // namespace cserver::server::handlers