[committed] libstdc++: Add default constructor to net::service_already_exists (PR 94199)

Jonathan Wakely jwakely@redhat.com
Fri Apr 24 13:19:33 GMT 2020


On 16/03/20 22:54 +0000, Jonathan Wakely wrote:
>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.

LWG preferred to make the constrcutor public, so this patch does that.

Tested x86_64-linux, committed to master.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 1912 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20200424/13d47466/attachment.bin>


More information about the Libstdc++ mailing list