This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/77451] Cannot convert lambda [](auto&&...){} to std::function<void()>
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 13 Jan 2017 20:03:56 +0000
- Subject: [Bug c++/77451] Cannot convert lambda [](auto&&...){} to std::function<void()>
- Auto-submitted: auto-generated
- References: <bug-77451-4@http.gcc.gnu.org/bugzilla/>
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 ***