[llvm-bugs] [Bug 51464] New: std::lerp is missing Arithmetic overloads
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Aug 12 15:00:58 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=51464
Bug ID: 51464
Summary: std::lerp is missing Arithmetic overloads
Product: libc++
Version: 12.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: All Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: konstantinua00 at gmail.com
CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
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 https://en.cppreference.com/w/cpp/numeric/lerp 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);
}
https://godbolt.org/z/vboY4aoE9
Current behaviour:
Does not compile with: "error: call to 'lerp' is ambiguous" (twice)
Expected behaviour:
Compilation with no issues.
--
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/20210812/10453e5f/attachment.html>
More information about the llvm-bugs
mailing list