This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/77451] Cannot convert lambda [](auto&&...){} to std::function<void()>


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
          Component|libstdc++                   |c++
         Resolution|---                         |DUPLICATE
      Known to fail|                            |5.4.0, 6.3.0, 7.0

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to TC from comment #1)
> This is not a libstdc++ bug. It's caused by GCC misparsing the ... in
> [](auto&&...) {} (i.e., a dup of bug 64095).
> 
> Under the mistaken parse (which is equivalent to [](auto&&, ...) {}),
> std::function<void()>'s constructor correctly refuses to accept the lambda.

Ah that explains it, thanks.

*** This bug has been marked as a duplicate of bug 64095 ***

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]