libstdc++: Add default constructor to net::service_already_exists (PR 94199)
authorJonathan Wakely <jwakely@redhat.com>
Mon, 16 Mar 2020 22:53:42 +0000 (22:53 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 16 Mar 2020 22:53:42 +0000 (22:53 +0000)
commitc62f5e6e1f457462b1cea74792833821bbea64bb
tree8c462df02fbe620b680dab49a4771f12bca12e65
parent447d196e75d97a9ac7c6a548dc9d0fe367adf6be
libstdc++: Add default constructor to net::service_already_exists (PR 94199)

The service_already_exists exception type specified in the TS doesn't
have any constructors defined. Since its base class isn't default
constructible, that means has no usable constructors. This may be a
defect in the TS.

This patch fixes it by adding a default constructor, but making it
private. The make_service function is declared as a friend to be able to
call that private constructor.

PR libstdc++/94199
* include/experimental/executor (service_already_exists): Add default
constructor. Declare make_service to be a friend.
* testsuite/experimental/net/execution_context/make_service.cc: New
test.
libstdc++-v3/ChangeLog
libstdc++-v3/include/experimental/executor
libstdc++-v3/testsuite/experimental/net/execution_context/make_service.cc [new file with mode: 0644]