29 Numerics library [numerics]

29.11 C compatibility [numerics.c]

29.11.2 Checked integer operations [numerics.c.ckdint]

template<class type1, class type2, class type3> bool ckd_add(type1* result, type2 a, type3 b); template<class type1, class type2, class type3> bool ckd_sub(type1* result, type2 a, type3 b); template<class type1, class type2, class type3> bool ckd_mul(type1* result, type2 a, type3 b);
Mandates: Each of the types type1, type2, and type3 is a signed or unsigned integer type ([basic.fundamental]).
Remarks: Each function template has the same semantics as the corresponding type-generic macro with the same name specified in See also: ISO/IEC 9899:2024, 7.20.

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant