https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103565

--- Comment #1 from cqwrteur <unlvsur at live dot com> ---
https://godbolt.org/z/bGfY6zh9x

#include<concepts>

template<std::unsigned_integral T>
inline constexpr bool add_carry_pattern(bool carry,T a,T b,T& out) noexcept
{
        T temp{carry+a};
        out=temp+b;
        return (out < b) | (temp < a);
}

Well. it should be restricted with unsigned_integral.

Reply via email to