public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/101870] std::lerp is missing Arithmetic overloads Date: Thu, 12 Aug 2021 18:46:46 +0000 [thread overview] Message-ID: <bug-101870-4-h5bO3jYnB7@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-101870-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101870 --- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>: https://gcc.gnu.org/g:9017326e19fe278d5f62898cca4682b17f8e8e07 commit r12-2886-g9017326e19fe278d5f62898cca4682b17f8e8e07 Author: Jonathan Wakely <jwakely@redhat.com> Date: Thu Aug 12 17:35:25 2021 +0100 libstdc++: Add additional overload of std::lerp [PR101870] The [cmath.syn] p1 wording about additional overloads sufficient to handle any arithmetic types also applies to std::lerp. This adds a new overload of std::lerp that does the required promotions to support arguments of arbitrary arithmetic types. A new __promoted_t alias template is added, which the C++17 function templates std::hypot and std::lerp can use to avoid instantiating the __promote_3 class template. Signed-off-by: Jonathan Wakely <jwakely@redhat.com> libstdc++-v3/ChangeLog: PR libstdc++/101870 * include/c_global/cmath (hypot): Use __promoted_t. (lerp): Add new overload accepting any arithmetic types. * include/ext/type_traits.h (__promoted_t): New alias template. * testsuite/26_numerics/lerp.cc: Moved to... * testsuite/26_numerics/lerp/1.cc: ...here. * testsuite/26_numerics/lerp/constexpr.cc: New test. * testsuite/26_numerics/lerp/version.cc: New test.
next prev parent reply other threads:[~2021-08-12 18:46 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-12 2:32 [Bug libstdc++/101870] New: " konstantinua00 at gmail dot com 2021-08-12 7:36 ` [Bug libstdc++/101870] " redi at gcc dot gnu.org 2021-08-12 18:46 ` cvs-commit at gcc dot gnu.org [this message] 2021-08-12 18:52 ` redi at gcc dot gnu.org 2021-10-12 10:59 ` cvs-commit at gcc dot gnu.org 2021-10-12 11:21 ` redi at gcc dot gnu.org 2021-11-26 15:40 ` cvs-commit at gcc dot gnu.org 2021-11-26 15:45 ` redi at gcc dot gnu.org 2022-05-09 16:40 ` cvs-commit at gcc dot gnu.org 2022-05-09 16:51 ` redi at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-101870-4-h5bO3jYnB7@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).