A common request in stdsimd is being able to initialize static variables with architecture-specific vector types.
There are many ways to hack this out, but AFAICt all of them basically reduce to using an union to implement a mem::transmute clone whose only different from mem::transmute is that it is a const fn.
Since this is already possible today, we should IMO just go ahead and make mem::transmute a const fn.
A common request in
stdsimdis being able to initialize static variables with architecture-specific vector types.There are many ways to hack this out, but AFAICt all of them basically reduce to using an union to implement a
mem::transmuteclone whose only different frommem::transmuteis that it is aconst fn.Since this is already possible today, we should IMO just go ahead and make
mem::transmuteaconst fn.