is-integer-like , is-signed-integer-like

  1. /is-integer-like/ is true if and only if T is an integer-like type.

# Declarations

template< class T >
constexpr bool /*is-integer-like*/ = /* see description */;

(since C++20) (exposition only*)

template< class T >
constexpr bool /*is-signed-integer-like*/ = /* see description */;

(since C++20) (exposition only*)

# Defect reports

DRApplied toBehavior as publishedCorrect behavior
LWG 3366(P2393R1)C++20the conversion between an integer-class type and its correspondinginteger type was not guaranteed to produce a representable valueguaranteed
LWG 3376(P2393R1)C++20integer-class types could only be class typesalso allowednon-class types
LWG 3467C++20bool was considered as an integer-like typeexcluded
LWG 3575(P2393R1)C++20integer-class types were not guaranteed to be three-way-comparableguaranteed

# See also