[LLVMbugs] [Bug 12551] New: Lambda function wrong call
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Apr 13 12:09:08 PDT 2012
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: unassignedbugs at nondot.org
ReportedBy: leonid.hiller at securekey.com
CC: llvmbugs at cs.uiuc.edu
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.
More information about the llvm-bugs
mailing list