-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Background: The Standard requires various functions to be marked noexcept, and additionally permits implementers to "strengthen" other functions of their choice by adding noexcept.
When our former intern Paolo Torres implemented lerp() in VS 2019 16.3, he noticed that noexcept was missing from its specification. He filed a Library Issue (bug report against the C++ Standard) LWG-3201 "lerp should be marked as noexcept", and he also strengthened his implementation. We follow a convention of marking such occurrences with comments:
Lines 1387 to 1400 in e034296
| _NODISCARD /* constexpr */ inline float lerp( | |
| const float _ArgA, const float _ArgB, const float _ArgT) noexcept /* strengthened */ { | |
| return _Common_lerp(_ArgA, _ArgB, _ArgT); | |
| } | |
| _NODISCARD /* constexpr */ inline double lerp( | |
| const double _ArgA, const double _ArgB, const double _ArgT) noexcept /* strengthened */ { | |
| return _Common_lerp(_ArgA, _ArgB, _ArgT); | |
| } | |
| _NODISCARD /* constexpr */ inline long double lerp( | |
| const long double _ArgA, const long double _ArgB, const long double _ArgT) noexcept /* strengthened */ { | |
| return _Common_lerp(_ArgA, _ArgB, _ArgT); | |
| } |
After the February 2020 meeting in Prague, Paolo's resolution for LWG-3201 has been accepted, so the C++20 Standard has caught up to his implementation (yay!). Accordingly, we should remove the /* strengthened */ comments on these overloads (as noexcept is required now).