We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent efe666e commit 84b0c39Copy full SHA for 84b0c39
libc/src/__support/big_int.h
@@ -367,6 +367,10 @@ struct BigInt {
367
using BigIntOther = BigInt<OtherBits, OtherSigned, OtherWordType>;
368
const bool should_sign_extend = Signed && other.is_neg();
369
370
+ static_assert(!(Bits == OtherBits && WORD_SIZE != BigIntOther::WORD_SIZE) &&
371
+ "This is currently untested for casting between bigints with "
372
+ "the same bit width but different word sizes.");
373
+
374
if constexpr (BigIntOther::WORD_SIZE < WORD_SIZE) {
375
// OtherWordType is smaller
376
constexpr size_t WORD_SIZE_RATIO = WORD_SIZE / BigIntOther::WORD_SIZE;
0 commit comments