* include/experimental/net/executor: Mark system_context::system_context() = default. * testsuite/experimental/net/executor/1.cc: Add new test for deleted system_context ::system_context(). --- libstdc++-v3/include/experimental/executor | 2 +- libstdc++-v3/testsuite/experimental/net/executor/1.cc | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-)
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<net::system_context>::value, "" ); +} + int main() { test01(); test02(); + test03(); } -- 2.25.3