From: Thomas Rodgers Date: Thu, 23 Apr 2020 20:42:46 +0000 (-0700) Subject: libstdc++: Mark experimental::net::system_context ctor deleted X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8c9d69bafc8fc1f31f6cb50dffab106641d086d0;p=gcc.git libstdc++: Mark experimental::net::system_context ctor deleted * include/experimental/net/executor (system_context): Mark system_context::system_context() = delete. * testsuite/experimental/net/executor/1.cc: Add new test to check system_context is not default constructible. --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 7cca91e090b..ecb8617d02a 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -14,6 +14,13 @@ * include/std/version (__cpp_lib_three_way_comparison): Define for freestanding builds. +2020-04-23 Thomas Rodgers + + * include/experimental/net/executor (system_context): Mark + system_context::system_context() = delete. + * testsuite/experimental/net/executor/1.cc: Add new + test to check system_context is not default constructible. + 2020-04-23 Iain Sandoe * include/std/coroutine: Update the inline namespace to __n4861. diff --git a/libstdc++-v3/include/experimental/executor b/libstdc++-v3/include/experimental/executor index b5c6e18a19a..fa39eaa0468 100644 --- a/libstdc++-v3/include/experimental/executor +++ b/libstdc++-v3/include/experimental/executor @@ -850,7 +850,7 @@ inline namespace v1 // construct / copy / destroy: - system_context() = default; + system_context() = delete; system_context(const system_context&) = delete; system_context& operator=(const system_context&) = delete; diff --git a/libstdc++-v3/testsuite/experimental/net/executor/1.cc b/libstdc++-v3/testsuite/experimental/net/executor/1.cc index 456d620e193..cd0af4b7737 100644 --- a/libstdc++-v3/testsuite/experimental/net/executor/1.cc +++ b/libstdc++-v3/testsuite/experimental/net/executor/1.cc @@ -85,9 +85,16 @@ test02() VERIFY( e == g ); } +void +test03() +{ + static_assert( ! std::is_default_constructible::value, "" ); +} + int main() { test01(); test02(); + test03(); }