There are only two categories of types in the language that cannot have const-qualification: reference types, and function types. So, if const T
fails to be a const-qualified type, it means T
is either a function type or a reference type. If you can rule out reference types, then you are left with only function types.
Note that a function type that carries a cv-qualifier, such as int(int) const
, is not a const-qualified type. It's an example of an "abominable function type", whose only real use is to compose or decompose pointer-to-member-function types. The type int(int) const
cannot be obtained by adding const-qualification on top of int(int)
. Rather, the const
applies to the implied object parameter.
!is_const
part. – Quinquereme