From 165dd6e59afd1d3a19b5b1b11524b49f886c9356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Kami=C5=84ski?= Date: Wed, 5 Nov 2025 18:12:25 +0100 Subject: [PATCH 1/2] New issue for US 230-360: Do not forward fn in completion_signatures --- xml/issue4448.xml | 49 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 xml/issue4448.xml diff --git a/xml/issue4448.xml b/xml/issue4448.xml new file mode 100644 index 0000000000..3fe44fa27c --- /dev/null +++ b/xml/issue4448.xml @@ -0,0 +1,49 @@ + + + + +Do not forward `fn` in `completion_signatures` +
+ +
+Tomasz KamiƄski +05 Nov 2025 +99 + + +Addresses US 230-360 +

`fn` can be called multiple times and therefore should not be forwarded.

+
+ + +

+This wording is relative to . +

+ +
    + +
  1. Modify as indicated:

    + +

    -8-

    +
    +namespace std::execution {
    +  template<completion-signature... Fns>
    +    struct completion_signatures {
    +      template<class Tag>
    +        static constexpr size_t count-of(Tag) { return see below; }
    +
    +      template<class Fn>
    +        static constexpr void for-each(Fn&& fn) {               // exposition only
    +          (std::forward<Fn>(fn)fn(static_cast<Fns*>(nullptr)), ...);
    +        }
    +    };
    +
    +  […]
    +}
    +
    +
  2. +
+ +
+ +
From 8b87f8ab826f87242436ea6ab559561aa56c46ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kr=C3=BCgler?= Date: Wed, 5 Nov 2025 18:17:19 +0100 Subject: [PATCH 2/2] Update xml/issue4448.xml --- xml/issue4448.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/issue4448.xml b/xml/issue4448.xml index 3fe44fa27c..cba85b3bf7 100644 --- a/xml/issue4448.xml +++ b/xml/issue4448.xml @@ -33,7 +33,7 @@ namespace std::execution { static constexpr size_t count-of(Tag) { return see below; } template<class Fn> - static constexpr void for-each(Fn&& fn) { // exposition only + static constexpr void for-each(Fn&& fn) { // exposition only (std::forward<Fn>(fn)fn(static_cast<Fns*>(nullptr)), ...); } };