[concepts.arithmetic] (original) (raw)

18 Concepts library [concepts]

18.4.7 Arithmetic concepts [concepts.arithmetic]

🔗

template<class T> concept [integral](#concept:integral "18.4.7 Arithmetic concepts [concepts.arithmetic]") = [is_integral_v](meta.type.synop#lib:is%5Fintegral%5Fv "21.3.3 Header <type_­traits> synopsis [meta.type.synop]")<T>;template<class T> concept [signed_integral](#concept:signed%5Fintegral "18.4.7 Arithmetic concepts [concepts.arithmetic]") = [integral](#concept:integral "18.4.7 Arithmetic concepts [concepts.arithmetic]")<T> && [is_signed_v](meta.type.synop#lib:is%5Fsigned%5Fv "21.3.3 Header <type_­traits> synopsis [meta.type.synop]")<T>;template<class T> concept [unsigned_integral](#concept:unsigned%5Fintegral "18.4.7 Arithmetic concepts [concepts.arithmetic]") = [integral](#concept:integral "18.4.7 Arithmetic concepts [concepts.arithmetic]")<T> && ![signed_integral](#concept:signed%5Fintegral "18.4.7 Arithmetic concepts [concepts.arithmetic]")<T>;template<class T> concept [floating_point](#concept:floating%5Fpoint "18.4.7 Arithmetic concepts [concepts.arithmetic]") = is_floating_point_v<T>;

1

#

[Note 1:

signed_integral can be modeled even by types that are not signed integer types ([basic.fundamental]); for example, char.

— _end note_]

2

#

[Note 2:

unsigned_integral can be modeled even by types that are not unsigned integer types ([basic.fundamental]); for example, bool.

— _end note_]