From 40cb369aab77971242ce5fd6daedfda088e1fe49 Mon Sep 17 00:00:00 2001 From: Nils Date: Wed, 28 Jul 2021 12:09:16 +0200 Subject: [PATCH] Formated --- inc/coro/concepts/executor.hpp | 9 +++------ inc/coro/concepts/range_of.hpp | 4 ++-- inc/coro/event.hpp | 2 +- inc/coro/sync_wait.hpp | 4 ++-- inc/coro/task_container.hpp | 2 +- inc/coro/when_all.hpp | 4 ++-- 6 files changed, 11 insertions(+), 14 deletions(-) diff --git a/inc/coro/concepts/executor.hpp b/inc/coro/concepts/executor.hpp index 0bf6a63..b16db34 100644 --- a/inc/coro/concepts/executor.hpp +++ b/inc/coro/concepts/executor.hpp @@ -12,16 +12,13 @@ concept executor = requires(type t, std::coroutine_handle<> c) { { t.schedule() - } - ->coro::concepts::awaiter; + } -> coro::concepts::awaiter; { t.yield() - } - ->coro::concepts::awaiter; + } -> coro::concepts::awaiter; { t.resume(c) - } - ->std::same_as; + } -> std::same_as; }; } // namespace coro::concepts diff --git a/inc/coro/concepts/range_of.hpp b/inc/coro/concepts/range_of.hpp index de67e94..2913956 100644 --- a/inc/coro/concepts/range_of.hpp +++ b/inc/coro/concepts/range_of.hpp @@ -9,12 +9,12 @@ namespace coro::concepts * Concept to require that the range contains a specific type of value. */ template -concept range_of = std::ranges::range&& std::is_same_v>; +concept range_of = std::ranges::range && std::is_same_v>; /** * Concept to require that a sized range contains a specific type of value. */ template -concept sized_range_of = std::ranges::sized_range&& std::is_same_v>; +concept sized_range_of = std::ranges::sized_range && std::is_same_v>; } // namespace coro::concepts diff --git a/inc/coro/event.hpp b/inc/coro/event.hpp index 3f10be8..260fef4 100644 --- a/inc/coro/event.hpp +++ b/inc/coro/event.hpp @@ -81,7 +81,7 @@ public: event(const event&) = delete; event(event&&) = delete; auto operator=(const event&) -> event& = delete; - auto operator=(event &&) -> event& = delete; + auto operator=(event&&) -> event& = delete; /** * @return True if this event is currently in the set state. diff --git a/inc/coro/sync_wait.hpp b/inc/coro/sync_wait.hpp index a59840a..1dad88c 100644 --- a/inc/coro/sync_wait.hpp +++ b/inc/coro/sync_wait.hpp @@ -17,8 +17,8 @@ public: sync_wait_event(const sync_wait_event&) = delete; sync_wait_event(sync_wait_event&&) = delete; auto operator=(const sync_wait_event&) -> sync_wait_event& = delete; - auto operator=(sync_wait_event &&) -> sync_wait_event& = delete; - ~sync_wait_event() = default; + auto operator=(sync_wait_event&&) -> sync_wait_event& = delete; + ~sync_wait_event() = default; auto set() noexcept -> void; auto reset() noexcept -> void; diff --git a/inc/coro/task_container.hpp b/inc/coro/task_container.hpp index d2b1c0b..001fd95 100644 --- a/inc/coro/task_container.hpp +++ b/inc/coro/task_container.hpp @@ -49,7 +49,7 @@ public: task_container(const task_container&) = delete; task_container(task_container&&) = delete; auto operator=(const task_container&) -> task_container& = delete; - auto operator=(task_container &&) -> task_container& = delete; + auto operator=(task_container&&) -> task_container& = delete; ~task_container() { // This will hang the current thread.. but if tasks are not complete thats also pretty bad. diff --git a/inc/coro/when_all.hpp b/inc/coro/when_all.hpp index cc8fc91..a96347b 100644 --- a/inc/coro/when_all.hpp +++ b/inc/coro/when_all.hpp @@ -105,7 +105,7 @@ public: } auto operator=(const when_all_ready_awaitable&) -> when_all_ready_awaitable& = delete; - auto operator=(when_all_ready_awaitable &&) -> when_all_ready_awaitable& = delete; + auto operator=(when_all_ready_awaitable&&) -> when_all_ready_awaitable& = delete; auto operator co_await() & noexcept { @@ -379,7 +379,7 @@ public: } auto operator=(const when_all_task&) -> when_all_task& = delete; - auto operator=(when_all_task &&) -> when_all_task& = delete; + auto operator=(when_all_task&&) -> when_all_task& = delete; ~when_all_task() {