[llvm-bugs] [Bug 34810] New: Mangled name for std::is_same within function identifier changes when including <complex>
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Oct 2 16:09:39 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=34810
Bug ID: 34810
Summary: Mangled name for std::is_same within function
identifier changes when including <complex>
Product: libc++
Version: 5.0
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: All Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: yaghmour.shafik at gmail.com
CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
Given the following code:
#include <complex>
#include <type_traits>
template <typename T>
std::enable_if_t<std::is_same<T, float>::value, float> f(const void *g)
{ return {}; }
template float f<float>(const void *g);
int main(){ return 0; }
and using the following command line options to clang++:
-stdlib=libc++ -std=c++14
The mangled name for the f(const void *g) drops std:: from std::is_same, we
get:
__Z1fIfENSt3__19enable_ifIXsr7is_sameIT_fEE5valueEfE4typeEPKv
^^^
See gotbolt example: https://godbolt.org/g/RehUpq
while dropping dropping the include of <complex> we get:
__Z1fIfENSt9enable_ifIXsr3std7is_sameIT_fEE5valueEfE4typeEPKv
^^^^
See godbolt example: https://godbolt.org/g/CkEwJw
In our larger application this is causing a linker failure.
I don't believe this is expected behavior, we should expect the same type for
std::is_same<float,float> whether we include <complex> or not
--
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/20171002/d5bc30bc/attachment.html>
More information about the llvm-bugs
mailing list