Not currently. See the "omissions" section of the proposal [1]:

> No parameterization on non-type values such as constants. This arises 
most obviously for arrays, where it might sometimes be convenient to 
write type Matrix[n int] [n][n]float64. It might also sometimes be useful 
to specify significant values for a container type, such as a default value 
for elements.


[1] 
- 
https://go.googlesource.com/proposal/+/refs/heads/master/design/43651-type-parameters.md#omissions

On Monday, June 6, 2022 at 2:33:58 AM UTC-4 amitl...@gmail.com wrote:

> Hi,
> Is it possible to set a generic type parameter of "T array of any size" 
> (not slice)? Something like:
> func foo[A [...]T, T constraints.Integer](a A) {
>   m := map[A]string{}
>   ...
> }
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/8ba9d395-a2a2-449b-b12d-5d67cd8b04b2n%40googlegroups.com.

Reply via email to