1 // Copyright 2017 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
12 var reflectValueOf
= reflect
.ValueOf
14 func reflectSwapper(x any
) func(int, int) {
15 v
:= reflectValueOf(x
)
16 tmp
:= reflect
.New(v
.Type().Elem()).Elem()
17 return func(i
, j
int) {
18 a
, b
:= v
.Index(i
), v
.Index(j
)