Add add_with_carry to builtin wrapper to be used by UInt class.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Another question to you is how the functions will work with implicit conversion. What I would do is to force input be the same with is_same of enable_if, if they are available.
libc/src/__support/builtin_wrappers.h | ||
---|---|---|
71 | Don't you think it will be good to add here static assert, that T is integer and unsigned for this implementation? | |
74 | Nit: From my point of view boolean OR will be more clear, than binary OR. |
libc/src/__support/builtin_wrappers.h | ||
---|---|---|
71 | Use enable_if to restrict to unsigned integers. |
libc/src/__support/builtin_wrappers.h | ||
---|---|---|
72 | Thank you. Font you think, that you should put ::value everywhere here? I'm not so familiar with internal classes... |
libc/src/__support/builtin_wrappers.h | ||
---|---|---|
72 | Since C++17, _t and _v helpers were added to C++, and some of our internal cpp:: templates did follow. |
Don't you think it will be good to add here static assert, that T is integer and unsigned for this implementation?