public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/97841] New: [C++17] is_invocable handling of incomplete return type is wrong
@ 2020-11-15 17:01 jason at gcc dot gnu.org
2020-11-19 15:18 ` [Bug libstdc++/97841] " redi at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2020-11-15 17:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97841
Bug ID: 97841
Summary: [C++17] is_invocable handling of incomplete return
type is wrong
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: jason at gcc dot gnu.org
Target Milestone: ---
I already mentioned this to Jonathan directly, but thought I should probably
also put it in bugzilla.
is_invocable and invoke_result condition their result on whether
"The expression INVOKE(declval<Fn>(),declval<ArgTypes>()...) is well-formed
when treated as an unevaluated operand"
It seems that we currently test for this by checking whether decltype of the
above is well-formed, but that seems wrong to me, since decltype of a call of
incomplete type is well-formed, but that call in any other unevaluated context
is ill-formed. So we accept this testcase, but VC++ and clang/libc++ reject
it:
#include <type_traits>
struct A;
using fn = A(*)(int);
static_assert (std::is_invocable_v<fn,int>); // error, A is incomplete
Various other places in the library talk about an expression being "well-formed
when treated as an unevaluated operand" and could probably use a check to make
sure they don't have the same problem.
I imagine that changing decltype(INVOKE(...)) to decltype(0,INVOKE(...)) in
various places would be a simple fix?
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/97841] [C++17] is_invocable handling of incomplete return type is wrong
2020-11-15 17:01 [Bug libstdc++/97841] New: [C++17] is_invocable handling of incomplete return type is wrong jason at gcc dot gnu.org
@ 2020-11-19 15:18 ` redi at gcc dot gnu.org
2021-04-19 10:40 ` redi at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2020-11-19 15:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97841
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org
Last reconfirmed| |2020-11-19
Status|UNCONFIRMED |ASSIGNED
Target Milestone|--- |11.0
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/97841] [C++17] is_invocable handling of incomplete return type is wrong
2020-11-15 17:01 [Bug libstdc++/97841] New: [C++17] is_invocable handling of incomplete return type is wrong jason at gcc dot gnu.org
2020-11-19 15:18 ` [Bug libstdc++/97841] " redi at gcc dot gnu.org
@ 2021-04-19 10:40 ` redi at gcc dot gnu.org
2021-04-27 11:39 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2021-04-19 10:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97841
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|redi at gcc dot gnu.org |unassigned at gcc dot gnu.org
Status|ASSIGNED |NEW
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/97841] [C++17] is_invocable handling of incomplete return type is wrong
2020-11-15 17:01 [Bug libstdc++/97841] New: [C++17] is_invocable handling of incomplete return type is wrong jason at gcc dot gnu.org
2020-11-19 15:18 ` [Bug libstdc++/97841] " redi at gcc dot gnu.org
2021-04-19 10:40 ` redi at gcc dot gnu.org
@ 2021-04-27 11:39 ` jakub at gcc dot gnu.org
2021-07-28 7:05 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-27 11:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97841
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.0 |11.2
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 11.1 has been released, retargeting bugs to GCC 11.2.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/97841] [C++17] is_invocable handling of incomplete return type is wrong
2020-11-15 17:01 [Bug libstdc++/97841] New: [C++17] is_invocable handling of incomplete return type is wrong jason at gcc dot gnu.org
` (2 preceding siblings ...)
2021-04-27 11:39 ` jakub at gcc dot gnu.org
@ 2021-07-28 7:05 ` rguenth at gcc dot gnu.org
2022-04-11 12:29 ` redi at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-07-28 7:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97841
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.2 |11.3
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 11.2 is being released, retargeting bugs to GCC 11.3
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/97841] [C++17] is_invocable handling of incomplete return type is wrong
2020-11-15 17:01 [Bug libstdc++/97841] New: [C++17] is_invocable handling of incomplete return type is wrong jason at gcc dot gnu.org
` (3 preceding siblings ...)
2021-07-28 7:05 ` rguenth at gcc dot gnu.org
@ 2022-04-11 12:29 ` redi at gcc dot gnu.org
2023-05-29 10:03 ` jakub at gcc dot gnu.org
2023-06-23 12:58 ` redi at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2022-04-11 12:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97841
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.3 |11.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/97841] [C++17] is_invocable handling of incomplete return type is wrong
2020-11-15 17:01 [Bug libstdc++/97841] New: [C++17] is_invocable handling of incomplete return type is wrong jason at gcc dot gnu.org
` (4 preceding siblings ...)
2022-04-11 12:29 ` redi at gcc dot gnu.org
@ 2023-05-29 10:03 ` jakub at gcc dot gnu.org
2023-06-23 12:58 ` redi at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-05-29 10:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97841
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.4 |11.5
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 11.4 is being released, retargeting bugs to GCC 11.5.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/97841] [C++17] is_invocable handling of incomplete return type is wrong
2020-11-15 17:01 [Bug libstdc++/97841] New: [C++17] is_invocable handling of incomplete return type is wrong jason at gcc dot gnu.org
` (5 preceding siblings ...)
2023-05-29 10:03 ` jakub at gcc dot gnu.org
@ 2023-06-23 12:58 ` redi at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2023-06-23 12:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97841
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.5 |---
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-06-23 12:58 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-15 17:01 [Bug libstdc++/97841] New: [C++17] is_invocable handling of incomplete return type is wrong jason at gcc dot gnu.org
2020-11-19 15:18 ` [Bug libstdc++/97841] " redi at gcc dot gnu.org
2021-04-19 10:40 ` redi at gcc dot gnu.org
2021-04-27 11:39 ` jakub at gcc dot gnu.org
2021-07-28 7:05 ` rguenth at gcc dot gnu.org
2022-04-11 12:29 ` redi at gcc dot gnu.org
2023-05-29 10:03 ` jakub at gcc dot gnu.org
2023-06-23 12:58 ` 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).