[libc-commits] [libc] [llvm] [libc][math][c23] Add {, u}fromfp{, x}{, f, l, f128} functions (PR #86003)

via libc-commits libc-commits at lists.llvm.org
Sat Mar 23 21:07:40 PDT 2024


================
@@ -141,7 +141,7 @@ LIBC_INLINE T round(T x) {
 }
 
 template <typename T, cpp::enable_if_t<cpp::is_floating_point_v<T>, int> = 0>
-LIBC_INLINE T round_using_current_rounding_mode(T x) {
+LIBC_INLINE constexpr T round_using_specific_rounding_mode(T x, int rnd) {
----------------
lntue wrote:

Since you are here, would you mind updating the `enable_if` to be on the returning type instead:
```
template <typename T>
LIBC_INLINE constexpr typename cpp::enable_if_t<..., T> rounding_using_specific_rounding_mode() { ... }
```
Same for the other 2 functions below.

https://github.com/llvm/llvm-project/pull/86003


More information about the libc-commits mailing list