Created on 2019-04-10.00:00:00 last changed 46 months ago
Proposed resolution:
This wording is relative to N4810.
Modify [cmath.syn], header <cmath> synopsis, as indicated:
// [c.math.lerp], linear interpolation
constexpr float lerp(float a, float b, float t) noexcept;
constexpr double lerp(double a, double b, double t) noexcept;
constexpr long double lerp(long double a, long double b, long double t) noexcept;
Modify [c.math.lerp] as indicated:
constexpr float lerp(float a, float b, float t) noexcept; constexpr double lerp(double a, double b, double t) noexcept; constexpr long double lerp(long double a, long double b, long double t) noexcept;
[ 2020-02 Moved to Immediate on Thursday afternoon in Prague. ]
The overloads of lerp should be marked as noexcept, and this can be explained through the Lakos Rule. This function does not specify any undefined behaviour, and as such has no preconditions. This implies it has a wide contract, meaning it cannot throw, and thus can be marked as noexcept.
History | |||
---|---|---|---|
Date | User | Action | Args |
2021-02-25 10:48:01 | admin | set | status: wp -> c++20 |
2020-02-24 16:02:59 | admin | set | status: immediate -> wp |
2020-02-14 06:55:06 | admin | set | messages: + msg11091 |
2020-02-14 06:55:06 | admin | set | status: new -> immediate |
2019-04-13 16:51:49 | admin | set | messages: + msg10393 |
2019-04-10 00:00:00 | admin | create |