Namespaces
Variants

Standard library header <stdckdint.h> (C++26)

From cppreference.net
Standard library headers

Dieser Header war ursprünglich in der C-Standardbibliothek ( <stdckdint.h> ) enthalten.

Dieser Header ist Teil der numeric -Bibliothek, insbesondere stellt er mehrere Funktionsvorlagen für checked integer arithmetic bereit.

Es ist nicht spezifiziert, ob <stdckdint.h> irgendwelche Deklarationen im Namensraum std bereitstellt.

Funktionen

(C++26)
geprüfte Additionsoperation für zwei Ganzzahlen
(Funktionstemplate)
(C++26)
geprüfte Subtraktionsoperation für zwei Ganzzahlen
(Funktionstemplate)
(C++26)
geprüfte Multiplikationsoperation für zwei Ganzzahlen
(Funktionstemplate)

Übersicht

#define __STDC_VERSION_STDCKDINT_H__ 202311L
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);