@@ -66,15 +66,15 @@ template <typename T>
6666
6767#define RETURN_IF (TYPE, BUILTIN ) \
6868 if constexpr (cpp::is_same_v<T, TYPE>) \
69- return BUILTIN(a, b, carry_in, carry_out);
69+ return BUILTIN(a, b, carry_in, & carry_out);
7070
7171// Returns the result of 'a + b' taking into account 'carry_in'.
7272// The carry out is stored in 'carry_out' it not 'nullptr', dropped otherwise.
7373// We keep the pass by pointer interface for consistency with the intrinsic.
7474template <typename T>
7575[[nodiscard]] LIBC_INLINE constexpr cpp::enable_if_t <cpp::is_unsigned_v<T>, T>
7676add_with_carry (T a, T b, T carry_in, T &carry_out) {
77- if constexpr (!cpp::is_constant_evaluated ()) {
77+ if (!cpp::is_constant_evaluated ()) {
7878#if __has_builtin(__builtin_addcb)
7979 RETURN_IF (unsigned char , __builtin_addcb)
8080#elif __has_builtin(__builtin_addcs)
@@ -100,7 +100,7 @@ add_with_carry(T a, T b, T carry_in, T &carry_out) {
100100template <typename T>
101101[[nodiscard]] LIBC_INLINE constexpr cpp::enable_if_t <cpp::is_unsigned_v<T>, T>
102102sub_with_borrow (T a, T b, T carry_in, T &carry_out) {
103- if constexpr (!cpp::is_constant_evaluated ()) {
103+ if (!cpp::is_constant_evaluated ()) {
104104#if __has_builtin(__builtin_subcb)
105105 RETURN_IF (unsigned char , __builtin_subcb)
106106#elif __has_builtin(__builtin_subcs)
0 commit comments