public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/107296] New: C++20 nested typename: non-template used as template, need typename
@ 2022-10-17 13:27 tomaqa at gmail dot com
2022-10-17 13:30 ` [Bug c++/107296] " tomaqa at gmail dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: tomaqa at gmail dot com @ 2022-10-17 13:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107296
Bug ID: 107296
Summary: C++20 nested typename: non-template used as template,
need typename
Product: gcc
Version: 12.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: tomaqa at gmail dot com
Target Milestone: ---
Created attachment 53714
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53714&action=edit
.ii file
This is kind of related to this, but in the opposite way:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102002
gcc -v -save-temps -c -std=c++20 nested_constructor.hpp
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/107296] C++20 nested typename: non-template used as template, need typename
2022-10-17 13:27 [Bug c++/107296] New: C++20 nested typename: non-template used as template, need typename tomaqa at gmail dot com
@ 2022-10-17 13:30 ` tomaqa at gmail dot com
2022-10-17 13:34 ` marxin at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: tomaqa at gmail dot com @ 2022-10-17 13:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107296
--- Comment #1 from Tomáš K. <tomaqa at gmail dot com> ---
Created attachment 53715
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53715&action=edit
output
Output of the gcc command mentioned above
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/107296] C++20 nested typename: non-template used as template, need typename
2022-10-17 13:27 [Bug c++/107296] New: C++20 nested typename: non-template used as template, need typename tomaqa at gmail dot com
2022-10-17 13:30 ` [Bug c++/107296] " tomaqa at gmail dot com
@ 2022-10-17 13:34 ` marxin at gcc dot gnu.org
2022-10-17 13:36 ` tomaqa at gmail dot com
2022-10-18 19:01 ` mpolacek at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-10-17 13:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107296
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Last reconfirmed| |2022-10-17
Keywords| |rejects-valid
Ever confirmed|0 |1
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Likely started with r10-3735-gcb57504a55015891.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/107296] C++20 nested typename: non-template used as template, need typename
2022-10-17 13:27 [Bug c++/107296] New: C++20 nested typename: non-template used as template, need typename tomaqa at gmail dot com
2022-10-17 13:30 ` [Bug c++/107296] " tomaqa at gmail dot com
2022-10-17 13:34 ` marxin at gcc dot gnu.org
@ 2022-10-17 13:36 ` tomaqa at gmail dot com
2022-10-18 19:01 ` mpolacek at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: tomaqa at gmail dot com @ 2022-10-17 13:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107296
--- Comment #3 from Tomáš K. <tomaqa at gmail dot com> ---
Created attachment 53716
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53716&action=edit
minimal example
Description:
When `-std=c++20` option is used, it requires `typename` in definition of a
constructor of a template class that is nested in a nested class.
But it is not related to a typename in this case ...
I believe this is a consequence of c++20 new rules about treating `typename`.
The example works just fine if it is run with `-std=c++17`, with the very same
compiler.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/107296] C++20 nested typename: non-template used as template, need typename
2022-10-17 13:27 [Bug c++/107296] New: C++20 nested typename: non-template used as template, need typename tomaqa at gmail dot com
` (2 preceding siblings ...)
2022-10-17 13:36 ` tomaqa at gmail dot com
@ 2022-10-18 19:01 ` mpolacek at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2022-10-18 19:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107296
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #2)
> Likely started with r10-3735-gcb57504a55015891.
Yes,
error: need ‘typename’ before ‘Mixin<B>::Nested::Mixin2’ because
‘Mixin<B>::Nested’ is a dependent scope
started with r10-3735-gcb57504a55015891,
error: non-template ‘Mixin2’ used as template
started with r12-4584-g1c690164668bda.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-10-18 19:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-17 13:27 [Bug c++/107296] New: C++20 nested typename: non-template used as template, need typename tomaqa at gmail dot com
2022-10-17 13:30 ` [Bug c++/107296] " tomaqa at gmail dot com
2022-10-17 13:34 ` marxin at gcc dot gnu.org
2022-10-17 13:36 ` tomaqa at gmail dot com
2022-10-18 19:01 ` mpolacek 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).