Abstract Types
These types are used in definitions of polymorphic (generic) functions that can be applied to a broad range of types.
type
anytype
Generic type.
It is a placeholder used in cases where no specific type requirements are needed, such as defining polymorphic parameters in functions and operators.
type
anyscalar
Abstract base scalar type.
All scalar types are derived from this type.
type
anyenum
Abstract base enumerated type.
All enum types are derived from this type.
type
anytuple
Generic tuple.
Similarly to anytype
it denotes a generic tuple without going into details of what the components are. Just as with anytype
, this is useful when defining polymorphic parameters in functions and operators.
Abstract Numeric Types
There are a number of abstract numeric types extending anyscalar
:
type
anyint
Abstract base scalar type for int16, int32, and int64.
type
anyfloat
Abstract base scalar type for float32 and float64.
type
anyreal
Abstract base scalar type for anyint, anyfloat, and decimal.
Abstract Range Types
There are some types that can be used to construct ranges. These scalar types are distinguished by the following abstract types:
type
anypoint
Abstract base type for all valid ranges.
Abstract base scalar type for int32, int64, float32, float64, decimal, datetime, cal::local_datetime, and cal::local_date.
type
anydiscrete
Abstract base type for all valid discrete ranges.
Abstract base scalar type for int32, int64, and cal::local_date.
type
anycontiguous
Abstract base type for all valid contiguous ranges.
Abstract base scalar type for float32, float64, decimal, datetime, and cal::local_datetime.