Skip to content

can a sender's connect member fn be private if it befriends execution::connect_t? #342

Open
@ericniebler

Description

@ericniebler

can a user expect this to work?

#include <execution>

struct Sender
{
  using sender_concept = std::execution::sender_t;

private:
  friend std::execution::connect_t;

  auto connect( std::execution::receiver auto rcvr )
  {
    //...
  }
};

int main()
{
  auto op = std::execution::connect(Sender{}, SomeReceiver{});
}

the current wording suggests it should work but it is not guaranteed. should it be?

same question about get_env and get_completion_signatures — although the latter is complicated by the fact that there is no get_completion_signatures_t to befriend.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2designdiscussionWe need to talk about this; there's nothing actionable here yetenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions