public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/94546] New: unimplemented: unexpected AST of kind nontype_argument_pack
@ 2020-04-10  7:20 bisqwit at iki dot fi
  2020-04-10 13:32 ` [Bug c++/94546] " mpolacek at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: bisqwit at iki dot fi @ 2020-04-10  7:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94546

            Bug ID: 94546
           Summary: unimplemented: unexpected AST of kind
                    nontype_argument_pack
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bisqwit at iki dot fi
  Target Milestone: ---

Rejects valid code.

$ g++-10 --version
g++-10 (Debian 10-20200324-1) 10.0.1 20200324 (experimental) [master revision
596c90d3559:023579257f5:906b3eb9df6c577d3f6e9c3ea5c9d7e4d1e90536]

$ g++-10 tmp.cc -std=c++20
tmp.cc: In instantiation of ‘void test(auto:1&&) [with auto:1 =
main()::<lambda(auto:2&& ...)>&]’:
tmp.cc:18:14:   required from here
tmp.cc:8:5: sorry, unimplemented: unexpected AST of kind nontype_argument_pack
    8 |     [&]<class... T>(T&&... rest)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    9 |     {
      |     ~
   10 |         plot(std::forward<T>(rest)...);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   11 |     };
      |     ~
tmp.cc:8: confused by earlier errors, bailing out

#include <utility>
void test(auto&& plot)
{
    // Note: For brevity, this lambda function is only
    // defined, not called nor assigned to a variable.
    // Doing those things won’t fix the error.
    [&]<class... T>(T&&... rest)
    {
        plot(std::forward<T>(rest)...);
    };
}
int main()
{
    auto Plot = [](auto&&...)
    {
    };
    test(Plot);
}

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-02-27 20:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-10  7:20 [Bug c++/94546] New: unimplemented: unexpected AST of kind nontype_argument_pack bisqwit at iki dot fi
2020-04-10 13:32 ` [Bug c++/94546] " mpolacek at gcc dot gnu.org
2020-04-10 13:50 ` [Bug c++/94546] [10 Regression] " mpolacek at gcc dot gnu.org
2020-04-10 21:31 ` jason at gcc dot gnu.org
2020-04-20 13:46 ` rguenth at gcc dot gnu.org
2020-04-22  6:28 ` cvs-commit at gcc dot gnu.org
2020-04-22  6:28 ` jason at gcc dot gnu.org
2021-02-12  2:47 ` cvs-commit at gcc dot gnu.org
2021-02-27 20:43 ` cvs-commit 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).