File: xsort_go1.21.go

package info (click to toggle)
golang-github-bradenaw-juniper 0.15.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 872 kB
  • sloc: sh: 27; makefile: 2
file content (14 lines) | stat: -rw-r--r-- 285 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//go:build go1.21

package xsort

import (
	"cmp"
)

// OrderedLess is an implementation of Less for cmp.Ordered types by using the < operator.
//
// Deprecated: cmp.Less is in the standard library as of Go 1.21.
func OrderedLess[T cmp.Ordered](a, b T) bool {
	return cmp.Less(a, b)
}