[llvm-bugs] [Bug 25333] New: name mangling of lambda default arguments in explicitly instantiated template
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Oct 28 03:21:19 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=25333
Bug ID: 25333
Summary: name mangling of lambda default arguments in
explicitly instantiated template
Product: clang
Version: 3.7
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: h.bruintjes at gmail.com
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
Classification: Unclassified
The following fails to compile with the error
"error: definition with same mangled name as another definition"
pointing to the lambda of g().
#include <functional>
template<typename T>
class P {
public:
void f(std::function<void ()> = [] {}) {
};
void g(std::function<void ()> = [] {}) {
}
};
template class P<int>;
It seems related to the explicit instantiation of P<int>, calling both
overloads of f() and g() directly does not trigger the error.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20151028/6df5cfc4/attachment.html>
More information about the llvm-bugs
mailing list