http://llvm.org/bugs/show_bug.cgi?id=17798
Bug ID: 17798
Summary: Regression: std::function cannot be assigned a lambda
function
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Created attachment 11481
--> http://llvm.org/bugs/attachment.cgi?id=11481&action=edit
Complete log
The following code does not compile with clang r193986 and libc++ r193989, even
though it compiled successfully with clang r193515:
#include <functional>
template <typename F>
static void foo(F f)
{
std::function<void()> func = f;
}
int main()
{
foo([]() {});
}
This results in (complete log attached):
% ~/LLVM/build/Release+Asserts/bin/clang++ -std=c++11 -stdlib=libc++ -v
clang.cpp
clang version 3.4 (trunk 193986)
Target: x86_64-apple-darwin10.8.0
[...]
In file included from clang.cpp:1:
In file included from /usr/include/c++/v1/functional:477:
In file included from /usr/include/c++/v1/memory:603:
/usr/include/c++/v1/tuple:267:11: error: rvalue reference to type '<lambda at
clang.cpp:12:9>' cannot bind to lvalue of
type '<lambda at clang.cpp:12:9>'
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs