diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2019-06-17 15:32:44 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2019-06-17 15:32:44 +0100 |
commit | 360a758ec81936f87978d6422677bb759202e47c (patch) | |
tree | ce11effce5c10f1f4575fcc840fd604c853e4d32 /libstdc++-v3/include/c_global | |
parent | 26b1320ee5e2e9e107e092162d1c82b682504534 (diff) | |
download | gcc-360a758ec81936f87978d6422677bb759202e47c.zip gcc-360a758ec81936f87978d6422677bb759202e47c.tar.gz gcc-360a758ec81936f87978d6422677bb759202e47c.tar.bz2 |
Add 'noexcept' to std::lerp
* include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
From-SVN: r272386
Diffstat (limited to 'libstdc++-v3/include/c_global')
-rw-r--r-- | libstdc++-v3/include/c_global/cmath | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libstdc++-v3/include/c_global/cmath b/libstdc++-v3/include/c_global/cmath index b843c18..01e56a5 100644 --- a/libstdc++-v3/include/c_global/cmath +++ b/libstdc++-v3/include/c_global/cmath @@ -1891,7 +1891,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _Fp> 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 |