package constraints
Import Path
golang.org/x/exp/constraints (on go.dev)
Dependency Relation
imports one package, and imported by 8 packages
Involved Source Files
Package constraints defines a set of useful constraints to be used
with type parameters.
Package-Level Type Names (total 6)
Complex is a constraint that permits any complex numeric type.
If future releases of Go add new predeclared complex numeric types,
this constraint will be modified to include them.
Float is a constraint that permits any floating-point type.
If future releases of Go add new predeclared floating-point types,
this constraint will be modified to include them.
Integer is a constraint that permits any integer type.
If future releases of Go add new predeclared integer types,
this constraint will be modified to include them.
Ordered is a constraint that permits any ordered type: any type
that supports the operators < <= >= >.
If future releases of Go add new ordered types,
this constraint will be modified to include them.
This type is redundant since Go 1.21 introduced [cmp.Ordered].
Signed is a constraint that permits any signed integer type.
If future releases of Go add new predeclared signed integer types,
this constraint will be modified to include them.
Unsigned is a constraint that permits any unsigned integer type.
If future releases of Go add new predeclared unsigned integer types,
this constraint will be modified to include them.
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |