[LLVMbugs] [Bug 23276] New: Template version of std::pow fails to compile
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Apr 18 05:50:34 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23276
Bug ID: 23276
Summary: Template version of std::pow fails to compile
Product: libc++
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: programmdude at gmail.com
CC: llvmbugs at cs.uiuc.edu, mclow.lists at gmail.com
Classification: Unclassified
I came up with a compile error when using emscripten 1.30 on windows, which
uses libcxx as it's c++ library.
When I peeked into the headers to find out what exactly caused it, I determined
that this static assert was causing it to fail, the relevant lines are below.
typedef typename __promote<_A1, _A2>::type __result_type;
static_assert((!(is_same<_A1, __result_type>::value && is_same<_A2,
__result_type>::value)), "");
Essentially, the two is_same queries are being inverted, so if both are true
then false is being passed to static_assert. According to MSDN, static_assert
fails if it's false. Unless I am mistaken, it should work correctly without the
invert operator.
For reference, compiling with std::pow<float>(1.0f, 2.0f) was able to get this
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/20150418/ea85dc1e/attachment.html>
More information about the llvm-bugs
mailing list