[Bug c++/107296] New: C++20 nested typename: non-template used as template, need typename
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
[Bug c++/107296] C++20 nested typename: non-template used as template, need typename
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107296 --- Comment #1 from Tomáš K. --- Created attachment 53715 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53715&action=edit output Output of the gcc command mentioned above
[Bug c++/107296] C++20 nested typename: non-template used as template, need typename
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107296 --- Comment #3 from Tomáš K. --- 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.