]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Make net::service_already_exists default constructible
authorJonathan Wakely <jwakely@redhat.com>
Fri, 24 Apr 2020 13:27:23 +0000 (14:27 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 24 Apr 2020 13:30:03 +0000 (14:30 +0100)
The LWG issue I created is Tentatively Ready and proposes to declare a
public default constructor, rather than the private one I added
recently.

Backport from mainline
2020-04-24  Jonathan Wakely  <jwakely@redhat.com>

* include/experimental/executor (service_already_exists): Make default
constructor public (LWG 3414).
* testsuite/experimental/net/execution_context/make_service.cc: Check
the service_already_exists can be default constructed.

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

index 9434ab185fe3dc75d5ebea5a1e90d6cd5eeffc2c..23203b3ed1577d27ae9528e78c07e4995ce893be 100644 (file)
@@ -1,3 +1,13 @@
+2020-04-24  Jonathan Wakely  <jwakely@redhat.com>
+
+       Backport from mainline
+       2020-04-24  Jonathan Wakely  <jwakely@redhat.com>
+
+       * include/experimental/executor (service_already_exists): Make default
+       constructor public (LWG 3414).
+       * testsuite/experimental/net/execution_context/make_service.cc: Check
+       the service_already_exists can be default constructed.
+
 2020-04-23  Thomas Rodgers  <rodgert@appliantology.com>
 
        Backport from mainline
index 9c0c7186234ee6a04490109b909b4a7508a0564d..13a24a8cdb59cca79b8e9ff73ada60bec9d0466b 100644 (file)
@@ -129,10 +129,9 @@ inline namespace v1
 
   class service_already_exists : public logic_error
   {
-    template<typename _Service, typename... _Args>
-      friend _Service&
-      make_service(execution_context&, _Args&&...);
-
+  public:
+    // _GLIBCXX_RESOLVE_LIB_DEFECTS
+    // 3414. service_already_exists has no usable constructors
     service_already_exists() : logic_error("service already exists") { }
   };
 
index f134add48b5b373f5bef4b13b9f9a915d5c84f0e..0898d12927a27f2a586998c300a138bea8f0c3cf 100644 (file)
@@ -34,3 +34,6 @@ void test01(net::execution_context& c)
 {
   net::make_service<S>(c);
 }
+
+static_assert(std::is_default_constructible<net::service_already_exists>(),
+             "LWG 3414. service_already_exists has no usable constructors");