public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Ian Lance Taylor <ian@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc/devel/gccgo] libstdc++: Make net::service_already_exists default constructible Date: Sun, 12 Jul 2020 17:31:59 +0000 (GMT) [thread overview] Message-ID: <20200712173159.5336F389040B@sourceware.org> (raw) https://gcc.gnu.org/g:00082ff88cf4e25fc1041e9effd1c92fbaaa8d62 commit 00082ff88cf4e25fc1041e9effd1c92fbaaa8d62 Author: Jonathan Wakely <jwakely@redhat.com> 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 <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-24 Kamlesh Kumar <kamleshbhalui@gmail.com> Jonathan Wakely <jwakely@redhat.com> 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<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") { } }; 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<S>(c); } + +static_assert(std::is_default_constructible<net::service_already_exists>(), + "LWG 3414. service_already_exists has no usable constructors");
reply other threads:[~2020-07-12 17:31 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200712173159.5336F389040B@sourceware.org \ --to=ian@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).