Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Splitting the return value of type pair into two different senders

Abierto
#479 7 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
cpp

Línea de trabajo

Comienza con el issue #479 y la semántica de split() de la propuesta descrita allí. Determina si el modelo actual de senders permite mover los dos elementos de un par a senders downstream separados sin copiarlos, y documenta el enfoque compatible o el diseño necesario que falta. En el issue no se nombran archivos fuente ni tests.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
C++
Estrellas
2.4k
Forks
270
Merge medio
2 d 16 h
PR fusionados (30 d)
43

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de NVIDIA/stdexec

Todos los issues de NVIDIA/stdexec

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.