isintegerlike , issignedintegerlike
template< class T > constexpr bool /*isintegerlike*/ = /* see description */; 
(1)  (since C++20) (exposition only*) 
template< class T > constexpr bool /*issignedintegerlike*/ = /* see description */; 
(2)  (since C++20) (exposition only*) 
T
is an integerlike type.T
is a signedintegerlike type.Contents 
[edit] Integerclass type
A type T
is an integerclass type if it is in a set of implementationdefined types that behave as integer types do, as defined below. An integerclass type is not necessarily a class type.
An integerclass type can represent 2N
consecutive integers, where N, a positive integer, is called the width of the integerclass type.
An integerclass type is either signed or unsigned:
 A signed integer class type can represent all integers in
[
2N1,
2N1
1]
, where N is greater than the width of every signed integral type.  An unsigned integer class type can represent all integers in
[
0,
2N
1]
, where N is greater than the width of every unsigned integral type.
All integerclass types model regular
and three_way_comparable
<std::strong_ordering>.
A valueinitialized object of integerclass type has value 0.
An expression E of integerclass type T
is contextually convertible to bool as if by bool(E != T(0)).
[edit] Integerlike type
A type other than (possibly cvqualified) bool is integerlike if it models integral
or if it is an integerclass type.
 An integerlike type is signedintegerlike if it models
signed_integral
or if it is a signedintegerclass type.  An integerlike type is unsignedintegerlike if it models
unsigned_integral
or if it is an unsignedintegerclass type.
[edit] Required behaviors
Expressions of integerclass type are explicitly convertible to any integerlike type, and implicitly convertible to any integerclass type of equal or greater width and the same signedness. Expressions of integral type are both implicitly and explicitly convertible to any integerclass type. Conversions between integral and integerclass types and between two integerclass types do not exit via an exception. The result of such a conversion is the unique value of the destination type that is congruent to the source modulo 2N
, where N is the width of the destination type.
Let Int<T>
denote the following type:
 If
T
is an integerclass type,Int<T>
is a unique hypothetical extended integer type of the same signedness with the same width asT
.  If
T
is an integral type, letInt<T>
is the same type asT
.
Given the following types, values and operators:
Type  Definition 
IC

an integerclass type 
IL

an integerlike type 
Value  Definition 
a  an object of type IC

b  an object of type IL

c  an lvalue of an integeral type 
x  an object of type Int<IC> that represent the same value as a

y  an object of type Int<IL> that represent the same value as b

Operator  Definition 
@=  one of +=, =, *=, /=, %=, &=, =, ^=, <<= and >>= 
@  one of +, , *, /, %, &, , ^, <<, >>, &&, , ==, !=, <, >, <=, >=, <=> and , 
The following expressions must be wellformed and have their specified result and effects if the specified conditions are satisfied:
Expression  Condition  Result  Effects 

a++  No condition  a prvalue of type IC whose value is equal to that of a prior to the evaluation

modifies the value of a by adding 1 to it 
a  modifies the value of a by subtracting 1 to it  
++a  expressionequivalent to a += 1  
a  expressionequivalent to a = 1  
&a  expressionequivalent to std::addressof(a)  
!a  !x is wellformed  same as !x  
+a  +x is wellformed  same as +x, but has type IC

same as +x 
a  x is wellformed  same as x, but has type IC

same as x 
~a  ~x is wellformed  same as ~x, but has type IC

same as ~x 
c @= a  c @= x is wellformed  an lvalue referring to c  same as c @= x 
a @= b  x @= y is wellformed  an lvalue referring to a  same as x @= y, except that the value that would be stored into x is stored into a 
a @ b  x @ y is wellformed  same as x @ y, but the result type is different:

same as x @ y 
b @ a  y @ x is wellformed  same as y @ x, but the result type is different:

same as y @ x 
[edit] Defect reports
The following behaviorchanging defect reports were applied retroactively to previously published C++ standards.
DR  Applied to  Behavior as published  Correct behavior 

LWG 3366 (P2393R1) 
C++20  the conversion between an integerclass type and its corresponding integer type was not guaranteed to produce a representable value 
guaranteed 
LWG 3376 (P2393R1) 
C++20  integerclass types could only be class types  also allowed nonclass types 
LWG 3467  C++20  bool was considered as an integerlike type  excluded 
LWG 3575 (P2393R1) 
C++20  integerclass types were not guaranteed to be threewaycomparable  guaranteed 
[edit] See also
(C++20) 
specifies that a semiregular type can be incremented with pre and postincrement operators (concept) 