From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2136) id 7074B395CCAA; Wed, 17 Jun 2020 20:44:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7074B395CCAA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1592426666; bh=W11RA96BKcgR/BHLvp9c90E8OmHj2mp0ydD+G3z2iE8=; h=From:To:Subject:Date:From; b=yH9aJ0PUhpft/XrGIwTlmaicFP68vkVku7QwHAVCAKcWl1atPASNs5wLLqi9w9CVo k3iwlDdeLfOPWAXXTS+ftoR6z5dPcCQ9ZIdxSIPqXDlaebE/bY1W8Eyz4L8ULfJl76 4+pYlyyb50Fjj/3frRbmLaCkNFvLXpWTkitBC5xc= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Aldy Hernandez To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc/devel/ranger] libstdc++: Make net::service_already_exists default constructible X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/devel/ranger X-Git-Oldrev: 1d072f3eeac486a7c6a2b1c093f1f3eebef59947 X-Git-Newrev: 00082ff88cf4e25fc1041e9effd1c92fbaaa8d62 Message-Id: <20200617204426.7074B395CCAA@sourceware.org> Date: Wed, 17 Jun 2020 20:44:26 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2020 20:44:26 -0000 https://gcc.gnu.org/g:00082ff88cf4e25fc1041e9effd1c92fbaaa8d62 commit 00082ff88cf4e25fc1041e9effd1c92fbaaa8d62 Author: Jonathan Wakely Date: Fri Apr 24 14:15:51 2020 +0100 libstdc++: Make net::service_already_exists default constructible The LWG issue I created is Tentatively Ready and proposes to declare a public default constructor, rather than the private one I added recently. * 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. Diff: --- libstdc++-v3/ChangeLog | 7 +++++++ libstdc++-v3/include/experimental/executor | 7 +++---- .../testsuite/experimental/net/execution_context/make_service.cc | 3 +++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 7b92ba7eebf..b3d001c02ab 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2020-04-24 Jonathan Wakely + + * 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-24 Kamlesh Kumar Jonathan Wakely diff --git a/libstdc++-v3/include/experimental/executor b/libstdc++-v3/include/experimental/executor index fa39eaa0468..3560e345e8a 100644 --- a/libstdc++-v3/include/experimental/executor +++ b/libstdc++-v3/include/experimental/executor @@ -129,10 +129,9 @@ inline namespace v1 class service_already_exists : public logic_error { - template - 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") { } }; diff --git a/libstdc++-v3/testsuite/experimental/net/execution_context/make_service.cc b/libstdc++-v3/testsuite/experimental/net/execution_context/make_service.cc index f134add48b5..0898d12927a 100644 --- a/libstdc++-v3/testsuite/experimental/net/execution_context/make_service.cc +++ b/libstdc++-v3/testsuite/experimental/net/execution_context/make_service.cc @@ -34,3 +34,6 @@ void test01(net::execution_context& c) { net::make_service(c); } + +static_assert(std::is_default_constructible(), + "LWG 3414. service_already_exists has no usable constructors");