From 4a81c39d94b6877f7753896218467ff77b8d7f6f Mon Sep 17 00:00:00 2001 From: Rutger Broekhoff Date: Mon, 30 Nov 2026 23:33:26 +0100 Subject: class -> typename --- server/src/xml.cppm | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'server/src/xml.cppm') diff --git a/server/src/xml.cppm b/server/src/xml.cppm index 2d186da..783b192 100644 --- a/server/src/xml.cppm +++ b/server/src/xml.cppm @@ -136,10 +136,10 @@ public: }; static_assert(std::ranges::input_range); -template +template class promise; -template +template struct [[clang::coro_await_elidable, clang::coro_return_type]] parser { using promise_type = promise; @@ -204,7 +204,7 @@ using event = std::variant< processing_instructions_event, xml_decl_event, eof_event >; -template +template concept event_type = requires(event ev) { std::get(ev); }; class executor; @@ -403,7 +403,7 @@ class executor return std::exchange(ex_, nullptr); } - template + template friend class promise; public: @@ -453,7 +453,7 @@ public: auto end() -> void; }; -template +template class promise_returnable : public promise_base { std::optional returned_value_; @@ -462,7 +462,7 @@ public: using result_type = T; using promise_base::promise_base; - template + template auto return_value(U&& v) -> void { returned_value_.emplace(std::forward(v)); @@ -486,13 +486,13 @@ public: auto return_void() -> void {} }; -template +template class promise : public promise_returnable { public: // Called with all the coroutine's arguments. // Ignoring all but the first argument, which should be the executor. - template + template explicit promise(executor_ref executor, Args&&...) : promise_returnable{executor} { @@ -566,7 +566,7 @@ public: return awaiter{req.executor}; } - template + template auto await_transform(parser const& coro) { struct [[clang::coro_await_elidable]] awaiter @@ -614,10 +614,10 @@ public: // Helpers for handling XML documents. Non-polymorphic functions // should be marked inline to allow HALO across TU boundaries. -template +template concept unconstrained = true; -template concept C> +template concept C> concept parser_of = requires { typename T::result_type; requires std::same_as, T>; @@ -627,12 +627,12 @@ concept parser_of = requires { template T> using parser_result_t = T::result_type; -template +template concept parser_invocable = std::invocable && parser_of, unconstrained>; -template +template requires parser_invocable using parser_invoke_result_t = parser_result_t>; @@ -833,7 +833,7 @@ inline auto read_string_contents(executor_ref e, attribute_view) template auto hohalo() { - return []( + return []( Args&&... args) -> std::invoke_result_t { co_return co_await f(std::forward(args)...); }; } -- cgit v1.3.1