intel / safe-arithmetic

Safe arithmetic library for C++20 and above. Safe arithmetic ensures correctness of arithmetic operations at compile-time. It protects against overflow, underflow, divide by zero, and out-of-bounds index access. This provides both functional correctness as well as greater protection against related security threats.

Home Page:https://intel.github.io/safe-arithmetic/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

♻️ Implement binary operators in terms of their assignment operator counterpart

lukevalenty opened this issue · comments

Unfortunately this can't be done for most operators. safe::var operators typically return types that are not the same as either of the operands.