[libc] [llvm] [libc][math] Implement nan(f|l) functions (PR #76690)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 4 06:52:45 PST 2024


================
@@ -1055,6 +1056,37 @@ hexadecimal_string_to_float(const char *__restrict src,
   return output;
 }
 
+struct NanMantissaResult {
----------------
lntue wrote:

I don't think you need to define a separate struct for this.  You can use `cpp::expected` in `src/__support/CPP/expected.h`:
```
  using NanMantissaResult = cpp::expected<uint64_t, int>;
```

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


More information about the llvm-commits mailing list