Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions set.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,17 @@
// To fix this the various types that make up 'comparable' must be explicitly enumerated in the
// Comparable type. This is fragile as this may change in subsequent Go versions.
//
// type Comparable[T any] interface {
// ~int | ~int8 | ~int16 | ~int32 | ~int64 |
// ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr |
// ~float32 | ~float64 |
// ~string | Comparer[T]
// }
//
// and it is unclear how to generalise this to (say) structs and pointers of any type.
//
// Ref: https://github.com/golang/go/issues/51259
//
// Ref: https://go.dev/blog/comparable
//
// An alternative would be to use:
Expand Down