comparable

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TisComparable

func TisComparable[P T]()

define a helper function with a type parameter P constrained by T and use that type parameter with isComparable -- 定义一个带有被T约束的类型参数P的辅助函数以在编译时确保类型T是可比较的

Types

type T

type T struct {
	// contains filtered or unexported fields
}

we want to ensure that T is strictly comparable

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL