Skip to content

Sender introspection determines tag differently from data and children #1818

@maartenarnst

Description

@maartenarnst

Currently, the sender introspection determines the tag based on the description, but the data and children directly from the tuple.

template <class _Sender>
using tag_of_t = decltype(__detail::__tag_of_v<_Sender>);
template <class _Sender>
using __data_of = __tuple_element_t<1, _Sender>;

Hence, when we write a custom sender like

struct MySender : __tuple<Tag, Data, Child> {
    ...
};

we still need to explicitly provide the description for stdexec to be able to determine the tag.

I'm not sure to understand why the approach for tag is different. Perhaps there could be a fallback so that tag_of_t is determined from __tuple_element_t<0, _Sender>; if the __desc_t path is not available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions