<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - std::lerp is missing Arithmetic overloads"
href="https://bugs.llvm.org/show_bug.cgi?id=51464">51464</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>std::lerp is missing Arithmetic overloads
</td>
</tr>
<tr>
<th>Product</th>
<td>libc++
</td>
</tr>
<tr>
<th>Version</th>
<td>12.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</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>konstantinua00@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>According to C++20 standard paragraph 20.8.1.2 ( [cmath.syn] ), std::lerp is
not an exception to expansion of acceptable parameters to integral and mixed
floating point types.
I.e. overload 4) from <a href="https://en.cppreference.com/w/cpp/numeric/lerp">https://en.cppreference.com/w/cpp/numeric/lerp</a> is
missing.
Example code (compile with -std=c++20):
#include<cmath>
int main()
{
std::lerp(int{},int{},int{});
std::lerp(float{}, double{}, (long double)0);
}
<a href="https://godbolt.org/z/vboY4aoE9">https://godbolt.org/z/vboY4aoE9</a>
Current behaviour:
Does not compile with: "error: call to 'lerp' is ambiguous" (twice)
Expected behaviour:
Compilation with no issues.</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>