[llvm-bugs] [Bug 46005] New: Name mangling problem when initializing inline std::function with lambda
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed May 20 07:42:05 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=46005
Bug ID: 46005
Summary: Name mangling problem when initializing inline
std::function with lambda
Product: clang
Version: 10.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: leandro.medina at sandboxsemiconductor.com
CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
richard-llvm at metafoo.co.uk
The code
#include <functional>
inline auto x = std::function<void()>([]() {});
inline auto y = std::function<void()>([]() {});
int main() { return 0; }
fails to compile with the following error message:
error: definition with same mangled name
'??$_Reset at V<lambda_1>@@@?$_Func_class at X$$V at std@@IEAAX$$QEAV<lambda_1>@@@Z' as
another definition
I'm using the STL implementation that shipped with Visual Studio 16.5.5. The
above compiles ok on gcc (both Linux based and mingw-w64), MSVC, and Clang with
libstdc++.
--
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/20200520/f6c27469/attachment.html>
More information about the llvm-bugs
mailing list