http://llvm.org/bugs/show_bug.cgi?id=12551
Bug #: 12551
Summary: Lambda function wrong call
Product: new-bugs
Version: 3.0
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Classification: Unclassified
Created attachment 8386
--> http://llvm.org/bugs/attachment.cgi?id=8386
Code Sample
2 template functions:
template <typename T>
void func1(T param);
template <typename T>
void func2(T param);
They both call another template function:
template <typename Func>
void Runit(Func &&func).
When Runit is called, in both func1 and func2 we pass a lambda as a parameter.
When Runit called from func1, the lambda of func2 called.
Please see the attached code sample.
Expected output:
lambda 1
lambda 2
Actual output
lambda 2
lambda 2
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- 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