From: Jonathan Wakely Date: Mon, 17 Jun 2019 14:32:44 +0000 (+0100) Subject: Add 'noexcept' to std::lerp X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=360a758ec81936f87978d6422677bb759202e47c;p=gcc.git Add 'noexcept' to std::lerp * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201). From-SVN: r272386 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index f05970ede20..8311111bd12 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,7 @@ 2019-06-17 Jonathan Wakely + * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201). + PR libstdc++/90281 Fix string conversions for filesystem::path * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use codecvt_utf8_utf16 instead of codecvt_utf8. Use diff --git a/libstdc++-v3/include/c_global/cmath b/libstdc++-v3/include/c_global/cmath index b843c18f1da..01e56a559fe 100644 --- a/libstdc++-v3/include/c_global/cmath +++ b/libstdc++-v3/include/c_global/cmath @@ -1891,7 +1891,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template constexpr _Fp - __lerp(_Fp __a, _Fp __b, _Fp __t) + __lerp(_Fp __a, _Fp __b, _Fp __t) noexcept { if (__a <= 0 && __b >= 0 || __a >= 0 && __b <= 0) return __t * __b + (1 - __t) * __a; @@ -1908,15 +1908,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } constexpr float - lerp(float __a, float __b, float __t) + lerp(float __a, float __b, float __t) noexcept { return std::__lerp(__a, __b, __t); } constexpr double - lerp(double __a, double __b, double __t) + lerp(double __a, double __b, double __t) noexcept { return std::__lerp(__a, __b, __t); } constexpr long double - lerp(long double __a, long double __b, long double __t) + lerp(long double __a, long double __b, long double __t) noexcept { return std::__lerp(__a, __b, __t); } #endif // C++20