From 8d11524d36dce140b887be475b7c59d89f6884c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dietmar=20K=C3=BChl?= Date: Sun, 26 Jan 2025 00:18:59 +0000 Subject: [PATCH] fixed formatting issues --- resources.md => docs/resources.md | 2 +- examples/stop.cpp | 6 +++--- include/beman/lazy/detail/any_scheduler.hpp | 22 ++++++++++----------- 3 files changed, 15 insertions(+), 15 deletions(-) rename resources.md => docs/resources.md (97%) diff --git a/resources.md b/docs/resources.md similarity index 97% rename from resources.md rename to docs/resources.md index 45b8246..ab0c245 100644 --- a/resources.md +++ b/docs/resources.md @@ -4,7 +4,7 @@ This page has links to some resources related to this repository: -* Lewis Baker's [Asymmetric Transfer blog](https://lewissbaker.github.io/) +* Lewis Baker's [Asymmetric Transfer blog](https://lewissbaker.github.io/) * Dietmar Kühl's [co_await All The Things](https://youtu.be/Npiw4cYElng?si=J0EYX6IgBf_u-e6z) from [ACCU 2023](https://accu.org/conf-previous/2023/sessions/) implementing diff --git a/examples/stop.cpp b/examples/stop.cpp index e4525bd..1952be5 100644 --- a/examples/stop.cpp +++ b/examples/stop.cpp @@ -22,9 +22,9 @@ int main() { struct context { struct xstop_source_type { // remove the x to disable the stop token - static constexpr bool stop_possible() { return false; } - static constexpr void request_stop() {} - static constexpr beman::execution::never_stop_token get_token() { return {}; } + static constexpr bool stop_possible() { return false; } + static constexpr void request_stop() {} + static constexpr beman::execution::never_stop_token get_token() { return {}; } }; }; diff --git a/include/beman/lazy/detail/any_scheduler.hpp b/include/beman/lazy/detail/any_scheduler.hpp index e45da70..a0527cd 100644 --- a/include/beman/lazy/detail/any_scheduler.hpp +++ b/include/beman/lazy/detail/any_scheduler.hpp @@ -38,12 +38,12 @@ namespace beman::lazy::detail { */ class any_scheduler { struct state_base { - virtual ~state_base() = default; - virtual void complete_value() = 0; - virtual void complete_error(::std::error_code) = 0; - virtual void complete_error(::std::exception_ptr) = 0; - virtual void complete_stopped() = 0; - virtual ::beman::execution::inplace_stop_token get_stop_token() = 0; + virtual ~state_base() = default; + virtual void complete_value() = 0; + virtual void complete_error(::std::error_code) = 0; + virtual void complete_error(::std::exception_ptr) = 0; + virtual void complete_stopped() = 0; + virtual ::beman::execution::inplace_stop_token get_stop_token() = 0; }; struct inner_state { @@ -100,10 +100,10 @@ class any_scheduler { decltype(::beman::execution::get_stop_token(::beman::execution::get_env(std::declval()))); using callback_t = ::beman::execution::stop_callback_for_t; - std::remove_cvref_t receiver; - inner_state s; - ::beman::execution::inplace_stop_source source; - ::std::optional callback; + std::remove_cvref_t receiver; + inner_state s; + ::beman::execution::inplace_stop_source source; + ::std::optional callback; template <::beman::execution::receiver R, typename PS> state(R&& r, PS& ps) : receiver(std::forward(r)), s(ps->connect(this)) {} @@ -118,7 +118,7 @@ class any_scheduler { if constexpr (::std::same_as) { return ::beman::execution::get_stop_token(::beman::execution::get_env(this->receiver)); } else { - if constexpr (not::std::same_as) { + if constexpr (not ::std::same_as) { if (not this->callback) { this->callback.emplace( ::beman::execution::get_stop_token(::beman::execution::get_env(this->receiver)),