Commit 00082ff8 by Jonathan Wakely

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.
parent 1d072f3e
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> 2020-04-24 Kamlesh Kumar <kamleshbhalui@gmail.com>
Jonathan Wakely <jwakely@redhat.com> Jonathan Wakely <jwakely@redhat.com>
......
...@@ -129,10 +129,9 @@ inline namespace v1 ...@@ -129,10 +129,9 @@ inline namespace v1
class service_already_exists : public logic_error class service_already_exists : public logic_error
{ {
template<typename _Service, typename... _Args> public:
friend _Service& // _GLIBCXX_RESOLVE_LIB_DEFECTS
make_service(execution_context&, _Args&&...); // 3414. service_already_exists has no usable constructors
service_already_exists() : logic_error("service already exists") { } service_already_exists() : logic_error("service already exists") { }
}; };
......
...@@ -34,3 +34,6 @@ void test01(net::execution_context& c) ...@@ -34,3 +34,6 @@ void test01(net::execution_context& c)
{ {
net::make_service<S>(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");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment