]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add 'noexcept' to std::lerp
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 17 Jun 2019 14:32:44 +0000 (14:32 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 17 Jun 2019 14:32:44 +0000 (14:32 +0000)
* include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@272386 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/include/c_global/cmath

index f05970ede20fb4eac2306000b28c71cfae2668f0..8311111bd12597a9cb486cc248b00dc1ac214563 100644 (file)
@@ -1,5 +1,7 @@
 2019-06-17  Jonathan Wakely  <jwakely@redhat.com>
 
+       * 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
index b843c18f1dac67fd70a2bfc2da1323a01e3483e4..01e56a559fe7ff93e8a088840abb51f2d896bf98 100644 (file)
@@ -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