Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Splitting the return value of type pair into two different senders

Aperta
#479 7 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
cpp

Direzione di ricerca

Inizia dall’issue #479 e dalla semantica di split() della proposta descritta lì. Determina se l’attuale modello di sender supporta lo spostamento dei due elementi di una coppia in sender downstream separati senza copiarli, e documenta l’approccio supportato o il design necessario mancante. Nell’issue non sono nominati file sorgente né test.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Hello, I am a grad student at Georgia Tech and I have been trying to follow your work on this proposal closely. I am quite looking forward to this proposal going into the C++ standard someday. My question is as follows:

Let's say we have a sender that returns a pair of values std::pair<std::vector, std::set>
Since these objects can be quite costly to copy, I want to move them. But let's say they are computed by a single sender and I want to move these into two different senders creating a split in the dependency chain.

A
| \
B C

So, above the A sender returns the pair and I want the contents of the pair moved to senders B and C. In the proposal, one can use the split() to achieve this kind of split in the dependency DAG but I don't see how I can avoid copying the pair when I create a multishot sender so that both B and C get access to the pair. But, as you can see, this doesn't achieve what I want. I want to move the first of the pair to B and the second of the pair to C.

Is there a way to achieve this kind of functionality with the current status of the proposal?

Thanks,
Fatih

Lingua principale
C++
Stelle
2.4k
Fork
270
Merge medio
2g 17h
PR unite (30g)
37

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NVIDIA/stdexec

Tutte le issue di NVIDIA/stdexec

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.