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.
This commit is contained in:
parent
1d072f3eea
commit
00082ff88c
3 changed files with 13 additions and 4 deletions
|
@ -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>
|
||||
|
||||
|
|
|
@ -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") { }
|
||||
};
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Add table
Reference in a new issue