Title
Do not forward `fn` in `completion_signatures`
Status
wp
Section
[exec.cmplsig]
Submitter
Tomasz Kamiński

Created on 2025-11-05.00:00:00 last changed 1 month ago

Messages

Date: 2025-11-11.10:48:55

Proposed resolution:

This wording is relative to N5014.

  1. Modify [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)), ...);
            }
        };
    
      […]
    }
    
Date: 2025-11-11.10:48:55

[ Kona 2025-11-08; Status changed: Immediate → WP. ]

Date: 2025-11-05.19:38:42

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

Date: 2025-11-05.00:00:00
Addresses US 230-360

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

History
Date User Action Args
2025-11-11 10:48:55adminsetmessages: + msg15701
2025-11-11 10:48:55adminsetstatus: immediate -> wp
2025-11-05 19:38:42adminsetmessages: + msg15524
2025-11-05 19:38:42adminsetstatus: new -> immediate
2025-11-05 17:13:04adminsetmessages: + msg15518
2025-11-05 00:00:00admincreate