This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Immediate status.

4448. Do not forward fn in completion_signatures

Section: 33.10 [exec.cmplsig] Status: Immediate Submitter: Tomasz KamiƄski Opened: 2025-11-05 Last modified: 2025-11-05

Priority: Not Prioritized

View all issues with Immediate status.

Discussion:

Addresses US 230-360

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

[Kona 2025-11-05; approved by LWG. Status changed: New → Immediate.]

Proposed resolution:

This wording is relative to N5014.

  1. Modify 33.10 [exec.cmplsig] 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)), ...);
            }
        };
    
      […]
    }