public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/94199] New: std::experimental::net::v1::make_service function template not instantiatable
@ 2020-03-16 20:16 erich.keane at intel dot com
2020-03-16 21:42 ` [Bug libstdc++/94199] " redi at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: erich.keane at intel dot com @ 2020-03-16 20:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94199
Bug ID: 94199
Summary: std::experimental::net::v1::make_service function
template not instantiatable
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: erich.keane at intel dot com
Target Milestone: ---
Discovered in Clang, since Clang diagnoses the issue without an instantiation,
here is a GCC repro: https://godbolt.org/z/7guiic
The function template tries to throw service_already_exists, which isn't
default constructible:
/opt/compiler-explorer/gcc-trunk-20200316/include/c++/10.0.1/experimental/executor:581:8:
error: use of deleted function
'std::experimental::net::v1::service_already_exists::service_already_exists()'
581 | throw service_already_exists();
Clang diagnoses just attempting to #include the file:
https://godbolt.org/z/yH9kNp
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/94199] std::experimental::net::v1::make_service function template not instantiatable
2020-03-16 20:16 [Bug libstdc++/94199] New: std::experimental::net::v1::make_service function template not instantiatable erich.keane at intel dot com
@ 2020-03-16 21:42 ` redi at gcc dot gnu.org
2020-03-16 22:53 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2020-03-16 21:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94199
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Status|UNCONFIRMED |ASSIGNED
Version|unknown |9.3.0
Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org
Target Milestone|--- |9.4
Ever confirmed|0 |1
Last reconfirmed| |2020-03-16
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/94199] std::experimental::net::v1::make_service function template not instantiatable
2020-03-16 20:16 [Bug libstdc++/94199] New: std::experimental::net::v1::make_service function template not instantiatable erich.keane at intel dot com
2020-03-16 21:42 ` [Bug libstdc++/94199] " redi at gcc dot gnu.org
@ 2020-03-16 22:53 ` cvs-commit at gcc dot gnu.org
2020-03-16 23:03 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-03-16 22:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94199
--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:
https://gcc.gnu.org/g:c62f5e6e1f457462b1cea74792833821bbea64bb
commit r10-7200-gc62f5e6e1f457462b1cea74792833821bbea64bb
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Mon Mar 16 22:53:42 2020 +0000
libstdc++: Add default constructor to net::service_already_exists (PR
94199)
The service_already_exists exception type specified in the TS doesn't
have any constructors defined. Since its base class isn't default
constructible, that means has no usable constructors. This may be a
defect in the TS.
This patch fixes it by adding a default constructor, but making it
private. The make_service function is declared as a friend to be able to
call that private constructor.
PR libstdc++/94199
* include/experimental/executor (service_already_exists): Add
default
constructor. Declare make_service to be a friend.
* testsuite/experimental/net/execution_context/make_service.cc: New
test.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/94199] std::experimental::net::v1::make_service function template not instantiatable
2020-03-16 20:16 [Bug libstdc++/94199] New: std::experimental::net::v1::make_service function template not instantiatable erich.keane at intel dot com
2020-03-16 21:42 ` [Bug libstdc++/94199] " redi at gcc dot gnu.org
2020-03-16 22:53 ` cvs-commit at gcc dot gnu.org
@ 2020-03-16 23:03 ` cvs-commit at gcc dot gnu.org
2020-03-16 23:15 ` redi at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-03-16 23:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94199
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:
https://gcc.gnu.org/g:31b204ace293b81fc51f76bf9faf459ab1cd7c50
commit r9-8381-g31b204ace293b81fc51f76bf9faf459ab1cd7c50
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Mon Mar 16 22:55:48 2020 +0000
libstdc++: Add default constructor to net::service_already_exists (PR
94199)
The service_already_exists exception type specified in the TS doesn't
have any constructors defined. Since its base class isn't default
constructible, that means has no usable constructors. This may be a
defect in the TS.
This patch fixes it by adding a default constructor, but making it
private. The make_service function is declared as a friend to be able to
call that private constructor.
Backport from mainline
2020-03-16 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/94199
* include/experimental/executor (service_already_exists): Add
default
constructor. Declare make_service to be a friend.
* testsuite/experimental/net/execution_context/make_service.cc: New
test.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/94199] std::experimental::net::v1::make_service function template not instantiatable
2020-03-16 20:16 [Bug libstdc++/94199] New: std::experimental::net::v1::make_service function template not instantiatable erich.keane at intel dot com
` (2 preceding siblings ...)
2020-03-16 23:03 ` cvs-commit at gcc dot gnu.org
@ 2020-03-16 23:15 ` redi at gcc dot gnu.org
2020-03-17 1:21 ` erich.keane at intel dot com
2020-03-17 13:01 ` redi at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2020-03-16 23:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94199
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed. Thanks for the report.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/94199] std::experimental::net::v1::make_service function template not instantiatable
2020-03-16 20:16 [Bug libstdc++/94199] New: std::experimental::net::v1::make_service function template not instantiatable erich.keane at intel dot com
` (3 preceding siblings ...)
2020-03-16 23:15 ` redi at gcc dot gnu.org
@ 2020-03-17 1:21 ` erich.keane at intel dot com
2020-03-17 13:01 ` redi at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: erich.keane at intel dot com @ 2020-03-17 1:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94199
--- Comment #4 from Erich Keane <erich.keane at intel dot com> ---
Thanks Jonathan!
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/94199] std::experimental::net::v1::make_service function template not instantiatable
2020-03-16 20:16 [Bug libstdc++/94199] New: std::experimental::net::v1::make_service function template not instantiatable erich.keane at intel dot com
` (4 preceding siblings ...)
2020-03-17 1:21 ` erich.keane at intel dot com
@ 2020-03-17 13:01 ` redi at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2020-03-17 13:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94199
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I've reported a new library issue (LWG 3414) suggesting we add a public default
constructor.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-03-17 13:01 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-16 20:16 [Bug libstdc++/94199] New: std::experimental::net::v1::make_service function template not instantiatable erich.keane at intel dot com
2020-03-16 21:42 ` [Bug libstdc++/94199] " redi at gcc dot gnu.org
2020-03-16 22:53 ` cvs-commit at gcc dot gnu.org
2020-03-16 23:03 ` cvs-commit at gcc dot gnu.org
2020-03-16 23:15 ` redi at gcc dot gnu.org
2020-03-17 1:21 ` erich.keane at intel dot com
2020-03-17 13:01 ` redi at gcc dot gnu.org
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).