[libc-commits] [PATCH] D150211: [libc] Rework of cpp::optional to support more types
Mikhail Ramalho via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu May 25 05:26:51 PDT 2023
mikhail.ramalho added a comment.
This is required because libc's UInt<T> can't be used with libc's optional, when trying to get libc built for riscv32, we get the following errors:
/home/mgadelha/tools/llvm-project/libc/src/__support/UInt.h:347:12: note: non-literal type 'optional<UInt<128U>>' cannot be used in a constant expression
return remainder;
^
/home/mgadelha/tools/llvm-project/libc/src/__support/UInt.h:352:12: note: in call to '&result->div(COUNT)'
result.div(other);
^
/home/mgadelha/tools/llvm-project/libc/test/src/math/CopySignTest.h:37:44: note: in call to '&UIntType(-1)->operator/(COUNT)'
constexpr UIntType STEP = UIntType(-1) / COUNT;
^
1 error generated.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150211/new/
https://reviews.llvm.org/D150211
More information about the libc-commits
mailing list