[libc-commits] [PATCH] D149594: [libc] Add explicit constructor calls to fix compilation when using UInt<T>

Michael Jones via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon May 1 10:32:17 PDT 2023


michaelrj added inline comments.


================
Comment at: libc/src/__support/UInt.h:609
+    UInt<Bits> one(1);
+    sub(one);
+    return *this;
----------------
This should probably not be constexpr, and neither should `operator++` since they call `add` and `sub` which use the non-const versions of `add_with_carry` and `sub_with_borrow`. You can add a constexpr version of those functions similar to how `operator+` and `operator-` are if you want.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149594/new/

https://reviews.llvm.org/D149594



More information about the libc-commits mailing list