[LLVMbugs] [Bug 12154] New: Passing a lambda from inside a function template to a method template of a class template does not compile
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Mar 1 09:37:07 PST 2012
http://llvm.org/bugs/show_bug.cgi?id=12154
Bug #: 12154
Summary: Passing a lambda from inside a function template to a
method template of a class template does not compile
Product: clang
Version: trunk
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: C++0x
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: jonathan.sauer at gmx.de
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
The following program fails to compile with clang r151811:
template <typename T, typename S>
static T bar(S s)
{
template s.foo<T>([]() -> bool { return true; });
}
This results in:
$ $ ~/LLVM/build/Release+Asserts/bin/clang++ -std=c++0x -v clang.cpp
clang version 3.1 (trunk 151811)
Target: x86_64-apple-darwin10.8.0
Thread model: posix
[...]
clang.cpp:4:2: error: expected expression
template s.foo<T>([]() -> bool { return true; });
^
1 error generated.
Turning the call to <s.foo> into a non-dependent name like this:
s.foo([]() -> bool { return true; });
results in a successful compile.
--
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