<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Template version of std::pow fails to compile"
href="https://llvm.org/bugs/show_bug.cgi?id=23276">23276</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Template version of std::pow fails to compile
</td>
</tr>
<tr>
<th>Product</th>
<td>libc++
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>programmdude@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu, mclow.lists@gmail.com
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>