Movatterモバイル変換


[0]ホーム

URL:


constraints

package
v0.0.0-...-8475f28Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2025 License:BSD-3-ClauseImports:1Imported by:6,455

Details

Repository

cs.opensource.google/go/x/exp

Links

Documentation

Overview

Package constraints defines a set of useful constraints to be usedwith type parameters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

typeComplex

type Complex interface {~complex64 | ~complex128}

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.

typeFloat

type Float interface {~float32 | ~float64}

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.

typeInteger

type Integer interface {Signed |Unsigned}

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.

typeOrdered

type Ordered =cmp.Ordered

Ordered is a constraint that permits any ordered type: any typethat 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 introducedcmp.Ordered.

typeSigned

type Signed interface {~int | ~int8 | ~int16 | ~int32 | ~int64}

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.

typeUnsigned

type Unsigned interface {~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr}

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.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp