libstdc++: Mark experimental::net::system_context ctor deleted
authorThomas Rodgers <rodgert@appliantology.com>
Thu, 23 Apr 2020 20:42:46 +0000 (13:42 -0700)
committerThomas Rodgers <rodgert@appliantology.com>
Thu, 23 Apr 2020 20:44:23 +0000 (13:44 -0700)
           * 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.

libstdc++-v3/ChangeLog
libstdc++-v3/include/experimental/executor
libstdc++-v3/testsuite/experimental/net/executor/1.cc

index 7cca91e090b06b5b5add5c6ce9495717b0770277..ecb8617d02adfaae98646164c7558093d91dddc6 100644 (file)
        * include/std/version (__cpp_lib_three_way_comparison): Define for
        freestanding builds.
 
+2020-04-23  Thomas Rodgers  <rodgert@appliantology.com>
+
+       * 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  <iain@sandoe.co.uk>
 
        * include/std/coroutine: Update the inline namespace to __n4861.
index b5c6e18a19a1ed8d112bcc557d82cb3be6193a33..fa39eaa0468987d0c9656df95958feada212b42e 100644 (file)
@@ -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;
 
index 456d620e193885164c58693982ed14fa8e5ffd22..cd0af4b77373f66b08cecd99c0f190163319753b 100644 (file)
@@ -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();
 }