[committed] libstdc++: Add default constructor to net::service_already_exists (PR 94199)
Christophe Lyon
christophe.lyon@linaro.org
Tue Mar 17 11:01:48 GMT 2020
Hi,
On Mon, 16 Mar 2020 at 23:54, Jonathan Wakely via Gcc-patches
<gcc-patches@gcc.gnu.org> 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.
>
The new test fails on arm-eabi / aarch64-elf (aka bare-metal / newlib
targets), because:
/arm-none-eabi/libstdc++-v3/include/experimental/executor:514: error:
'mutex' in namespace 'std' does not name a type
/arm-none-eabi/libstdc++-v3/include/experimental/executor:561: error:
'mutex' is not a member of 'std'
[...]
I don't remember what's the usual "fix" for this
Thanks,
Christophe
> Tested powerpc64le-linux, committed to master.
>
> I'll backport it to gcc-9 too.
>
More information about the Libstdc++
mailing list